Re: Function evaluation
- To: mathgroup at smc.vnet.net
- Subject: [mg17605] Re: [mg17550] Function evaluation
- From: BobHanlon at aol.com
- Date: Mon, 17 May 1999 02:14:41 -0400
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 5/14/99 6:23:51 AM, phpcp at csv.warwick.ac.uk writes: >I have a function defined as > >f[s_,n_]:=BesselK[0,n*(1-s)]-BesselK[0,n]*BesselI[0,n*(1-s)]/BesselI[0,n] > >We can see that at s=0, f is zero. but mathematica returns a small number, >i think it is the workingprecision. I have tried to change the working >precision, but that does not help. the function still evaluates to a >10^-16 number. I am using this function to define other functions. Ccan >someone help me find a way to evaluate this function correctly. > Sanjay, Handle the case for s==0 separately: f[s_/; s==0,n_]:=0; f[s_,n_]:=BesselK[0,n*(1-s)]-BesselK[0,n]*BesselI[0,n*(1-s)]/BesselI[0,n]; Bob Hanlon