Boost logo

Boost Users :

Subject: Re: [Boost-users] spherical bessel functions
From: David Bergman (davidrbergman_at_[hidden])
Date: 2012-03-22 16:20:03


John, Thanks for the reply.  I did not give you enough details and apologize. Here is a more detailed code snippet. double a = 0.1; double lambda = 0.05; double pi = 3.1415926535897932384626433832795; double kw = 2.0*pi/lambda; int n = 8;     // try 7, 9, etc. cout << kw*a << endl; double xtest = boost::math::sph_neumann(n,a*kw); //double ytest = boost::math::cyl_neumann(n,a*kw); cout << xtest << endl; //<< " " << ytest << endl; Here is some more info to diagnose the problem. The problem seems to be in the spherical neumann function sph_neumann, and it seems to be for n = 8.   When I posted the problem I quoted cyl_neumann( ) because ultimately that's the function that appeared in the debugger. I inappropriately assumed that that function would cause problems, but the problem seems to be in sph_neumann.  It doesn't matter if I define double x = a*kw and pass this into the interface, what seems to matter is the value of the index, when n = 8 it doesn't work.  It works for 9 and 10 and all integers before 8. I can replace x with a, lambda or pi and it works for n = 8, so it seems to be this combination of numbers or something I'm doing wrong w/r to type casting variables etc. I am using VS2005 and boost version 1.0, (104400). I hope this helps.  David ________________________________ From: John Maddock <boost.regex_at_[hidden]> To: boost-users_at_[hidden] Sent: Thursday, March 22, 2012 2:00 PM Subject: Re: [Boost-users] spherical bessel functions >Any ideas? Which Boost version?  This works for me as: std::cout << boost::math::cyl_neumann(8, 12.6) << std::endl; prints: 0.244094 John. _______________________________________________ Boost-users mailing list Boost-users_at_[hidden] http://lists.boost.org/mailman/listinfo.cgi/boost-users



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net