On 02/11/2015 14:10, campagne wrote:
double order = (double)lcur + 0.5; unsigned int n_zeros; vector<double> zeros; boost::math::cyl_bessel_j_zero(order,1,n_zeros, back_inserter(zeros));
I'am running Boost 1.59 on Mac OS X Maverick
for lcur = 0, I expect zeros filed with Pi, 2 Pi, 3Pi.... but the first two zeros I get NaN I get also other nan as for the 2nd zeros for lcur=1
Have you experienced such problem or I have a memory leak somewhere ?
I tried: double lcur = 0; double order = (double)lcur + 0.5; unsigned int n_zeros = 10; std::vector<double> zeros; boost::math::cyl_bessel_j_zero(order, 1, n_zeros, back_inserter(zeros)); for(unsigned i = 0; i < zeros.size(); ++i) std::cout << std::setprecision(16) << zeros[i] << std::endl; and got the expected output: 3.141592653589794 6.283185307179586 9.424777960769379 12.56637061435917 15.70796326794897 18.84955592153876 21.99114857512855 25.13274122871834 28.27433388230814 31.41592653589793 Which Boost version and compiler are you using? John.