MathGroup Archive 2010

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

Search the Archive

Re: Re: Numerical Problem

  • To: mathgroup at
  • Subject: [mg107062] Re: [mg107044] Re: Numerical Problem
  • From: Richard Fateman <fateman at>
  • Date: Tue, 2 Feb 2010 03:25:08 -0500 (EST)
  • References: <> <> <hk17nr$oja$> <> <>

Mark McClure wrote:
> On Mon, Feb 1, 2010 at 6:13 AM, Richard Fateman <fateman at> wrote:
>> Thanks, Tony, for providing a nice example of how arithmetic matters.
>> Your  3-line program got pretty plausible results in version 5.0
>> ...
>> But apparently not in version 7, where DanL suggests that Intel's
>> numerical library may have sent it off in the wrong direction.
> I cannot reproduce these results on my MacBook Pro, i.e. I get (on V7
> and V5.2) the same erroneous results that Tony gets with V7.  I
> suppose this supports Dan's suggestion that this is a hardware issue.
I think it is not hardware, but that version 5 somehow used higher 
precision.  It may be that
it used extended-double, supported partly in hardware.
 The results on version 7 are the same as you get from executing the 
specified calculations
in double precision using other programming languages.

> I haven't examined the equations closely but, as I understand it, they
> arise via Euler's method applied to a stiff system.  Thus, I would
> expect numerical instability. 
>  I would also expect the iterates to
> lose significance, which is exactly what we see. 
Yes, and eventually Mathematica produces nothing but noise.

The exact answer, written out to 40 decimal digits is

In fact, carrying 40 digits of precision is enough to compute this result as

>  Seems to be a good
> example of significance arithmetic doing exactly what we want.

Mathematica's version of arithmetic thinks that it has lost 5 or 6 extra 
decimal digits.  (In fact claims to have
lost all of them.) So in one sense if the user gets to look at the 
output and notices 0.10^-1  or some such thing,
and knows how to interpret that, yes, that would be good; significance 
arithmetic has given a warning, albeit
overly cautious. (Other ways of estimating or bounding the accumulated 
error in the iteration would require more thought.)

But if the user does not look at the output but merely has a program 
compare this result to
0, then the result would be,  why yes! your answer IS zero! or possibly 
why yes! your answer is 1! Maybe even both!
This is a hazard, and I wonder if this is exactly what people want.

And again,  just doing 40 decimal digits  (maybe 135 bit floating-point 
fraction) you can get a pretty good answer,
even in Mathematica, except that Mathematica will tell you it can't. 
Just insert the occasional SetPrecision.


  • Prev by Date: Re: What does & mean?
  • Next by Date: Re: What does & mean?
  • Previous by thread: Re: Numerical Problem
  • Next by thread: Re: Re: Re: Numerical Problem