Re: More problems with SetPrecision[] and/or $MinPrecision,...
- To: mathgroup at smc.vnet.net
- Subject: [mg57025] Re: More problems with SetPrecision[] and/or $MinPrecision,...
- From: dh <dh at metrohm.ch>
- Date: Thu, 12 May 2005 02:34:30 -0400 (EDT)
- References: <d5sjpu$nph$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Terry, MMA version: 5.1, Windows in my case everything work as it should. I get: 0.x10^-21 this is the correct answer for a value of zero that has an accuracy of 21 and (by definition) zero precision Sincerely, Daniel 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 >