MathGroup Archive 2011

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

Search the Archive

Re: Numerical accuracy/precision - this is a bug or a feature?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120012] Re: Numerical accuracy/precision - this is a bug or a feature?
  • From: Richard Fateman <fateman at cs.berkeley.edu>
  • Date: Tue, 5 Jul 2011 05:11:22 -0400 (EDT)
  • References: <ius5op$2g7$1@smc.vnet.net> <ius7hm$358$1@smc.vnet.net>

In brief:  yes to both.

On 7/4/2011 4:18 AM, Kevin J. McCann wrote:
...
>>
>> 1. N[2.0,20] should give 2 with accuracy/precision/whatsever about 20
>> decimal digits, i.e. 2.00000000000000000000
>

WRI will defend this as a feature.

You thought that the semantics of N[] were the same as SetPrecision
e.g.

N[SetPrecision[2.0, 20]*N[Sqrt[2], 20], 20]


works as you expected.

So from your perspective, and from the perspective of anyone else who 
thinks along the same lines, it is a bug.  I would prefer to call it
a design error.

2.0  (indeed, any floating point number) is a perfectly respectable way 
of denoting a number that can be expressed in higher precision by adding 
binary zeros. WRI doesn't agree.

RJF



  • Prev by Date: Re: How to write a "proper" math document
  • Next by Date: Re: Operations on RegularExpression matches
  • Previous by thread: Re: Numerical accuracy/precision - this is a bug or a feature?
  • Next by thread: Re: Numerical accuracy/precision - this is a bug or a feature?