From: dh on 28 May 2010 07:23 Hi Alexey, as you get an aswer not with 60 but only 1 digit, I assume that the input is somehow converted into lower precision. This is in agreement with: N[1000000000000000000000001/10^24 - 1, 60] what gives the correct result: 1.00000000000000000000000000000000000000000000000000000000000*10^-24 Also, if you eliminate the terminal "1", you get 0.*10^-23 Or if you replace the terminal 1 by a zero, you get 0.*10^-24 Therefore, I conlude that 1.000000000000000000000001 is read as "1", neglecting the terminal one. This is corroborated by: N[1.000000000000000000000001, 60] this gives: 1.00000000000000000000000 Why this happens, I can not tell, but it looks like a bug to me. Cheers, Daniel Am 27.05.2010 12:46, schrieb Alexey: > Hello, > Consider the following: > > In[1]:= N[1.000000000000000000000001 - 1, 60] > > Out[1]= 0.*10^-24 > > I can not understand why this happens. Can anyone explain the reason? > What is about "arbitrary precision arithmetics"? > -- Daniel Huber Metrohm Ltd. Oberdorfstr. 68 CH-9100 Herisau Tel. +41 71 353 8585, Fax +41 71 353 8907 E-Mail:<mailto:dh(a)metrohm.com> Internet:<http://www.metrohm.com>
From: Bill Rowe on 28 May 2010 07:23 On 5/27/10 at 6:46 AM, lehin.p(a)gmail.com (Alexey) wrote: >In[1]:= N[1.000000000000000000000001 - 1, 60] >Out[1]= 0.*10^-24 >I can not understand why this happens. Can anyone explain the >reason? What is about "arbitrary precision arithmetics"? The problem is you are attempting to convert a number from one precision to a higher precision. That is: In[9]:= Precision[1.000000000000000000000001] Out[9]= 24. But if you had entered the real value as having 60 digit precision things would work as you expect. That is: In[10]:= 1.000000000000000000000001`60 - 1 Out[10]= 1.00000000000000000000000000000000000*10^-24 or you could have started with exact values and used N to convert then to 60 digit precision, i.e., In[11]:= N[1 + 10^-24, 60] - 1 Out[11]= 1.00000000000000000000000000000000000*10^-24
From: Richard Fateman on 19 Jun 2010 07:48 Perhaps you wanted SetPrecision [1.000000000000000000000001, 60] -1 which returns.. 9.9999999999999863800355333982586279*10^-25 This takes the binary software-float number that is closest to 1.000...1 accurate to the equivalent of about 24 decimal digits. Then extends it on the right by appending additional binary zeros to it until it gets to the binary precision which is the equivalent of about 60 decimal digits. Then subtracts exactly 1, which happens to be an exact number in binary float. WRI claims their arithmetic is intuitive and easy to understand and does the right thing almost all the time. On the other hand, you are not the first person to be puzzled by it. RJF
From: Noqsi on 20 Jun 2010 03:56 On Jun 19, 5:48 am, Richard Fateman <fate...(a)cs.berkeley.edu> wrote: > Perhaps you wanted > > SetPrecision [1.000000000000000000000001, 60] -1 > > which returns.. > > 9.9999999999999863800355333982586279*10^-25 > > This takes the binary software-float number that > is closest to 1.000...1 accurate to the equivalent of about 24 deci= mal > digits. Then extends it on the right by > appending additional binary zeros to it until it gets to the binary > precision which is the equivalent of about 60 decimal digits. > Then subtracts exactly 1, which happens to be an exact number > in binary float. > > WRI claims their arithmetic is intuitive and easy to understand > and does the right thing almost all the time. The arithmetic is reasonably intuitive. The user interface is less so. > > On the other hand, you are not the first person to be puzzled by it. Approximation is often puzzling. The ideological war you wage against WRI is unhelpful here. The wise person understands that there are multiple points of view. Your IEEE754-based ideology has its own weaknesses: abuse of the concepts of "rational" and "finite", and weak connection to the real number system. Matthew 7:3 applies.
From: Richard Fateman on 21 Jun 2010 02:11 Noqsi wrote: .... .. > > Approximation is often puzzling. The ideological war you wage against > WRI is unhelpful here. The wise person understands that there are > multiple points of view. If it is required to be wise in the ways of WRI's (unusual) arithmetic to use WRI software, then that is more than a user interface problem. Your IEEE754-based ideology has its own > weaknesses: abuse of the concepts of "rational" and "finite", and weak > connection to the real number system. Matthew 7:3 applies. I'm not sure what you mean by IEEE754-based ideology. Probably the whole community of numerical error analysts agrees on a model that is different from WRI's. Not being familiar with your quote from the Bible, I checked on it and found that it was all about logarithmic singularities in the complex plane (a+b*eye).. viz: Why do you see the speck that is in your brother's eye, but do not notice the log that is in your own eye? RJF > >
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: hexagon tiling demonstration Next: Corruption of formulas after cut-and-paste |