MathGroup Archive 1999

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

Search the Archive

Re: Function evaluation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg17577] Re: Function evaluation
  • From: adam.smith at hillsdale.edu
  • Date: Mon, 17 May 1999 02:14:28 -0400
  • Organization: Deja.com - Share what you know. Learn what you don't.
  • References: <7hgdks$4c6@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Sanjay,

In your recent post to comp.soft-sys.math.mathematica you wrote that
the following function was not returning zero when s=0.  Instead it was
returning something very small (~10^-16).

f[s_,n_]:=BesselK[0,n*(1-s)]-BesselK[0,n]*BesselI[0,n*(1-s)]/BesselI
[0,n]

I tried this on my system (Pentium II running Windows NT with
Mathematica version 3.0.1) and it returned exactly zero for s=0.  What
system are you using? - there can be small differences like between
systems and even between version 3.0.0 and 3.0.1.
You also indicated that you looked at WorkingPrecison.  There are
several others that may come into play.  Here is how they are set on my
machine:
$MachinePrecision = 16
$MaxExtraPrecision = 50.
$MaxPrecision = 5000.

Adam Smith


In article <7hgdks$4c6 at smc.vnet.net>,
  <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.
>
> cheers,
> sanjay
>
>


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---


  • Prev by Date: Re: Not a floating-point number message
  • Next by Date: Re: Is it a bug?
  • Previous by thread: Re: Function evaluation
  • Next by thread: RE: Re: Function evaluation