From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Avinash K. Hathiramani
Sent: Thursday, August 02, 2012 2:53 PM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Using <boost/math/distributions/non_central_t.hpp> gives unexpected error
Hi Paul and John,
Thank you both for your replies.
Paul - thank you for attaching your .cpp. I have created a new project and simply copied and pasted your exact code into my main, but I still get the same error as before. Please see below for some additional information on my setup.
> Your code works for me with both VC10 and gcc-4.6 Mingw, both output:
>
> Probability density of Student's t is 0.425022
> Cumulative probability of Student's t is 0.425022
>
> Can you give us details of the compiler/platform and any other relevant
> information (for example have you set any of the policy changing macros
> described in the docs?)
>
I am using Code::Blocks 10.05, and using the gcc-3.81 Mingw compiler. (My system is Windows XP Professional (Service Pack 3), 32-bit). I have not used Boost previously and am not using too many of it's functions at the moment, so I have not made any changes to the settings (or set any policy changing macros). I'm still a bit new to using external libraries, so I've just done the most basic installation. Also, I am using Boost 1.49.0 - sorry I should have mentioned this in my first post.
No code changes to this since Boost 1.49 so that should be fine.
Boost.Math does not *require* any libraries to be installed, only to include the headers - ie header only. (In act you should NOT build a library).
So you should only link to anything required to get a hello world example to run. (make sure one does?)
Do you get this error message from my code?
"Error in function boost::math::gamma_p_derivative<e>(e, e): numeric overflow".
This is most odd because it appears to be type 'e'???? not double, float etc.
When does it throw - can you show the 'echoed' df and non-centrality OK?
does the pdf work? or the cdf? on their own?
Try some simpler examples using Boost.Math - perhaps \libs\math\example\distribution_construction.cpp.
HTH
Paul