MathGroup Archive 2005

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

Search the Archive

Re: More problems with SetPrecision[] and/or $MinPrecision,...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56991] Re: [mg56954] More problems with SetPrecision[] and/or $MinPrecision,...
  • From: Chris Chiasson <chris.chiasson at gmail.com>
  • Date: Thu, 12 May 2005 02:32:28 -0400 (EDT)
  • References: <200505110924.FAA24004@smc.vnet.net>
  • Reply-to: Chris Chiasson <chris.chiasson at gmail.com>
  • Sender: owner-wri-mathgroup at wolfram.com

On my Mathematica 5.0 for Windows XP sp2, the output of your code is:
From In[11]:=
0``20.85065878472074

From In[11]:=
0``20.85065878472074

On 5/11/05, terryisnow at yahoo.com <terryisnow at yahoo.com> wrote:
> Dear Mathematica Guru's,
> 
> Lately I seem to be finding a lot of SetPrecision[]/$MinPrecision bugs.
> This appears to be another one:
> 
> In[1]:= $MinPrecision = 20;
> 
>         savedData1 = 669151541.9328941107875;
>         savedData2 = 0.99960472897267246018765;
>         savedData3 = Log[savedData1^savedData2/savedData1^savedData2];
> 
>         Print[Apply[Plus, savedData3 -
> Log[savedData1^savedData2/savedData1^savedData2]] ];
> 
>         x = 0.99960472897267245645;
>         y = 669151541.932894110712;
>         Do[
>            z = SetPrecision[y,24]^x;
>         ,{50000}];
> 
>         Print[Apply[Plus, savedData3 -
> Log[savedData1^savedData2/savedData1^savedData2]] ];
> 
> The output looks like this on my Mathematica 3.0 system:
> 
>         0
>         1.9586707534418188626 x 10^-30
> 
> Obviously the question is why is the second Print statement not
> also returning a 0, after all the code that runs between the two
> Print statements neither changes any of the variables referenced
> by the two Print statements, nor even references any of the same
> variables.
> 
> The problem maybe reproducible without the $MinPrecision but with
> this specific test case it is needed (there might however be other
> constants that can reproduce the problem without $MinPrecision).
> 
> Can someone also run this on a more recent version of Mathematica
> to see if it reproduces? All help is very much appreciated!
> 
> Terry
> 
> 


-- 
Chris Chiasson
http://chrischiasson.com/
1 (810) 265-3161


  • Prev by Date: Re: More problems with SetPrecision[] and/or $MinPrecision,...
  • Next by Date: Re: NDSolve. SolveDelayed->True
  • Previous by thread: Re: More problems with SetPrecision[] and/or $MinPrecision,...
  • Next by thread: Re: More problems with SetPrecision[] and/or $MinPrecision,...