# When I operate this simple file,there is such a problem.I don't know how to solve it. Could someone help me?

**URL:** <https://root-forum.cern.ch/t/when-i-operate-this-simple-file-there-is-such-a-problem-i-dont-know-how-to-solve-it-could-someone-help-me/52559>\
**Category:** ROOT\
**Tags:** root, math\
**Created:** [November 30, 2022, 12:52pm UTC](https://root-forum.cern.ch/t/when-i-operate-this-simple-file-there-is-such-a-problem-i-dont-know-how-to-solve-it-could-someone-help-me/52559 "2022-11-30T12:52:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lujifei](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/7feea3/32.png) [@lujifei](https://root-forum.cern.ch/u/lujifei)\
**Post date:** [November 30, 2022, 12:52pm UTC](https://root-forum.cern.ch/t/when-i-operate-this-simple-file-there-is-such-a-problem-i-dont-know-how-to-solve-it-could-someone-help-me/52559/1 "2022-11-30T12:52:23Z")

</div>

![截图 2022-11-30 20-49-12](https://root-forum.cern.ch/uploads/default/original/3X/1/3/13a7674b3906631dc3147b1b4154cd002b4feb28.png)

 ![截图 2022-11-30 20-35-33](https://root-forum.cern.ch/uploads/default/original/3X/3/1/3148d4333f3012e31a887f2375de7513dcf49470.png)

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [November 30, 2022, 12:59pm UTC](https://root-forum.cern.ch/t/when-i-operate-this-simple-file-there-is-such-a-problem-i-dont-know-how-to-solve-it-could-someone-help-me/52559/2 "2022-11-30T12:59:11Z")

</div>

can you copy/paste it ?

---

<div class="post-metadata">

**Author:** ![lujifei](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/7feea3/32.png) [@lujifei](https://root-forum.cern.ch/u/lujifei)\
**Post date:** [November 30, 2022, 1:12pm UTC](https://root-forum.cern.ch/t/when-i-operate-this-simple-file-there-is-such-a-problem-i-dont-know-how-to-solve-it-could-someone-help-me/52559/4 "2022-11-30T13:12:29Z")

</div>

```auto
void basic()
{
//std::complex<double> z {0,1};
//std::complex<double> n=pow(z,2);
//cout<< n <<endl;
//double m= ROOT::Math::tgamma(15.0); //gamma function
//cout<< m <<endl; 
int n=3;
double m=0.5,x=0.3;
double p = ROOT::Math::assoc_laguerre(n,m,x);
cout << p<<endl;
}

```

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [November 30, 2022, 1:20pm UTC](https://root-forum.cern.ch/t/when-i-operate-this-simple-file-there-is-such-a-problem-i-dont-know-how-to-solve-it-could-someone-help-me/52559/5 "2022-11-30T13:20:42Z")

</div>

I guess @moneta can help.

---

<div class="post-metadata">

**Author:** ![lujifei](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/7feea3/32.png) [@lujifei](https://root-forum.cern.ch/u/lujifei)\
**Post date:** [November 30, 2022, 1:29pm UTC](https://root-forum.cern.ch/t/when-i-operate-this-simple-file-there-is-such-a-problem-i-dont-know-how-to-solve-it-could-someone-help-me/52559/6 "2022-11-30T13:29:43Z")

</div>

Thank you for your advice! Just now , I changed “p=ROOT::Math::assoc\_laguerre(n,m,x)” to “p=assoc\_laguerre(n,m,x)”.I got the value.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [November 30, 2022, 7:11pm UTC](https://root-forum.cern.ch/t/when-i-operate-this-simple-file-there-is-such-a-problem-i-dont-know-how-to-solve-it-could-someone-help-me/52559/7 "2022-11-30T19:11:47Z")

</div>

Make sure you understand that the “[`ROOT::Math::assoc_laguerre(unsigned n, double m, double x)`](https://root.cern.ch/doc/master/group__SpecFunc.html#ga78739fccb12fb72d4a494a3b397039d9)” is not exactly the same as the “`assoc_laguerre(unsigned n, unsigned m, double x)`” mathematical special function provided by the C++ library (note: your “`double m = 0.5`” will be taken as “`unsigned m = 0`”).

BTW. For the missing GSL library, you need to install an appropriate package, e.g., on Ubuntu / Debian try: `sudo apt install libgsl-dev`

---

<div class="post-metadata">

**Author:** ![lujifei](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/7feea3/32.png) [@lujifei](https://root-forum.cern.ch/u/lujifei)\
**Post date:** [December 1, 2022, 10:41am UTC](https://root-forum.cern.ch/t/when-i-operate-this-simple-file-there-is-such-a-problem-i-dont-know-how-to-solve-it-could-someone-help-me/52559/8 "2022-12-01T10:41:52Z")

</div>

Thanks for your advice. After I did this, my problem was solved. Maybe I am missing GSL library.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [December 15, 2022, 10:41am UTC](https://root-forum.cern.ch/t/when-i-operate-this-simple-file-there-is-such-a-problem-i-dont-know-how-to-solve-it-could-someone-help-me/52559/9 "2022-12-15T10:41:56Z")

</div>

Closed on December 15, 2022, 10:41am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
