re gularized gamma incomplete function (v 1.39)

I am using boost v1.39 libraries on Ubuntu 9.04. This is the first time I am
using the boost libraries for some mathematical work. I needed to use the
regularized incomplete gamma function for one of my programs. The
documentation told me that gamma_q was the upper incomplete gamma function
for the job.
So I tried the syntax gamma_q(a,b) and I got an error saying "gamma_q was
not declared in this scope". Realizing that the boost libraries were in
/opt/boost, I compiled with the following :
g++ ggpdf.cpp -I /opt/boost/include/boost-1_39/
I included the boost header with a
#include

So I tried the syntax gamma_q(a,b) and I got an error saying "gamma_q was not declared in this scope". Realizing that the boost libraries were in /opt/boost, I compiled with the following :
g++ ggpdf.cpp -I /opt/boost/include/boost-1_39/
I included the boost header with a #include
. I stil got the same error (gamma_q was not declared in scope). I then thought that I should link the libraries manually and then tried g++ ggcdf.cpp -I /opt/boost/include/boost-1_39/ -L /opt/boost/lib/
You don't need to link to any external library to use that function. Since you don't give the actual code that's failing it's hard to be sure what the issue is, unless you forgot to either: 1) Prefix the function call with boost:: or 2) Add an appropriate using statement to put the function in the global scope? HTH, John.

AMDG darthshak wrote:
I am using boost v1.39 libraries on Ubuntu 9.04. This is the first time I am using the boost libraries for some mathematical work. I needed to use the regularized incomplete gamma function for one of my programs. The documentation told me that gamma_q was the upper incomplete gamma function for the job.
So I tried the syntax gamma_q(a,b) and I got an error saying "gamma_q was not declared in this scope". Realizing that the boost libraries were in /opt/boost, I compiled with the following :
g++ ggpdf.cpp -I /opt/boost/include/boost-1_39/
I included the boost header with a #include
. I stil got the same error (gamma_q was not declared in scope). I then thought that I should link the libraries manually and then tried g++ ggcdf.cpp -I /opt/boost/include/boost-1_39/ -L /opt/boost/lib/
...and still no luck. Also, the size of my /opt/boost folder is only 65M, which seems kind of small. Am I missing some incantation here for compiling or is it just an incomplete install?
Perhaps you should try boost::math::gamma_q(a, b)? In Christ, Steven Watanabe
participants (3)
-
darthshak
-
John Maddock
-
Steven Watanabe