MathGroup Archive 1999

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

Search the Archive

Re: Function evaluation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg17585] Re: Function evaluation
  • From: "Peltio" <peltDOT.ioNOS at PAMiolDOT.it>
  • Date: Mon, 17 May 1999 02:14:32 -0400
  • Organization: Peltio Inc.
  • References: <7hgdks$4c6@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

phpcp at csv.warwick.ac.uk wrote
>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.


To get rid of the approximation errors , you can use Chop
f[s_,n_]:=BesselK[0,n*(1-s)]-BesselK[0,n]*
                    BesselI[0,n*(1-s)]/BesselI[0,n] //Chop

Hope this helps,
Peltio





  • Prev by Date: Re: HELP: How to set RGBColor for ContourPlot?
  • Next by Date: Re: MathLink examples
  • Previous by thread: Re: Function evaluation
  • Next by thread: Re: Function evaluation