{ "cells": [ { "cell_type": "markdown", "id": "84024896", "metadata": {}, "source": [ "# mathcoreSpecFunc\n", "Example macro showcasing some special mathematical functions.\n", "\n", "To execute the macro type in:\n", "\n", "```cpp\n", "root[0] .x mathcoreSpecFunc.C\n", "```\n", "\n", "It will create a canvas with the representation of the tgamma, lgamma, erf and erfc functions.\n", "\n", "\n", "\n", "\n", "**Author:** Andras Zsenei \n", "This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Tuesday, May 19, 2026 at 08:25 PM." ] }, { "cell_type": "code", "execution_count": 1, "id": "20510fdb", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:25:49.918414Z", "iopub.status.busy": "2026-05-19T20:25:49.918279Z", "iopub.status.idle": "2026-05-19T20:25:50.264488Z", "shell.execute_reply": "2026-05-19T20:25:50.263896Z" } }, "outputs": [], "source": [ "TF1 *f1a = new TF1(\"f1a\",\"ROOT::Math::tgamma(x)\",0,20);\n", "TF1 *f2a = new TF1(\"f2a\",\"ROOT::Math::lgamma(x)\",0,100);\n", "TF1 *f3a = new TF1(\"f3a\",\"ROOT::Math::erf(x)\",0,5);\n", "TF1 *f4a = new TF1(\"f4a\",\"ROOT::Math::erfc(x)\",0,5);\n", "\n", "TCanvas *c1 = new TCanvas(\"c1\",\"c1\",800,600);\n", "\n", "f1a->SetLineColor(kBlue);\n", "f2a->SetLineColor(kBlue);\n", "f3a->SetLineColor(kBlue);\n", "f4a->SetLineColor(kBlue);\n", "\n", "c1->Divide(2,2);\n", "\n", "c1->cd(1);\n", "f1a->Draw();\n", "c1->cd(2);\n", "f2a->Draw();\n", "c1->cd(3);\n", "f3a->Draw();\n", "c1->cd(4);\n", "f4a->Draw();" ] }, { "cell_type": "markdown", "id": "684bd2d6", "metadata": {}, "source": [ "Draw all canvases " ] }, { "cell_type": "code", "execution_count": 2, "id": "ab3351cd", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:25:50.266771Z", "iopub.status.busy": "2026-05-19T20:25:50.266554Z", "iopub.status.idle": "2026-05-19T20:25:50.580010Z", "shell.execute_reply": "2026-05-19T20:25:50.579303Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "