Re: Numerical accuracy/precision - this is a bug or a feature?
- To: mathgroup at smc.vnet.net
- Subject: [mg120109] Re: Numerical accuracy/precision - this is a bug or a feature?
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Fri, 8 Jul 2011 04:55:22 -0400 (EDT)
On 7/7/11 at 7:31 AM, slawek at host.pl (slawek) wrote: >U=BFytkownik "Kevin J. McCann" <Kevin.McCann at umbc.edu> napisa=B3 w >wiadomo=B6ci grup dyskusyjnych:iv1a86$sji$1 at smc.vnet.net... >>2.0 is not an integer nor a rational, it is machine precision. On >>the other hand 2 is an integer and exact. >The decimal fraction 2.0 is in mathematics (the science) exactly the >same as the sum 2 + 0/10 True enough. >The convention that 2.0 is less accurate than 2.00 is applied ONLY >in Mathematica (the computer program). Not true. First In[10]:= Precision[2.0] === Precision[2.00] Out[10]= True In[11]:= Accuracy[2.0] === Accuracy[2.00] Out[11]= True But it is true in Mathematica 2 + 0/10 is different than 2.0. But the fact these are different is not at all unique to Mathematica. Any application that understands floating point values and integer values that is compliant with IEEE standards will report 2 + 0/10 is different than 2.0