MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


  • Prev by Date: Re: Is it a bug?
  • Next by Date: Re: Impulse Fumction using UnitStep???
  • Previous by thread: Function evaluation
  • Next by thread: Re: Function evaluation