New spherical functions not efficient
- To: mathgroup at smc.vnet.net
- Subject: [mg91058] New spherical functions not efficient
- From: Antonio <aneves at gmail.com>
- Date: Tue, 5 Aug 2008 04:00:33 -0400 (EDT)
Dear All, When using the new built-in spherical functions (SphericalBesselJ and SphericalHankelH1, my mathematica programs slowed quit a bit. Writting out the following code: In[1]:= Do[y=RandomReal[{0,10}];n=RandomInteger[{1,20}];Sqrt[(y \ \[Pi])/2](BesselJ[n+1/2,y]+\[ImaginaryI] \ BesselY[n+1/2,y]),{20000}]//Timing Do[y=RandomReal[{0,10}];n=RandomInteger[{1,20}];y \ SphericalHankelH1[n,y],{20000}]//Timing Out[1]= {0.951,Null} Out[2]= {2.823,Null} We can see that the new functions are slower to evaluate. Is something wrong? For now I will stick with the faster code for the spherical functions. Antonio