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: [mg120252] Re: Numerical accuracy/precision - this is a bug or a feature?
  • From: Richard Fateman <fateman at eecs.berkeley.edu>
  • Date: Thu, 14 Jul 2011 21:21:14 -0400 (EDT)

On 7/14/2011 6:22 AM, Christoph Lhotka wrote:
> Dear group!
>
....

> My question is: how dangerous is it to overwrite such a fundamental
> function as Equal?
>
> Best,
>
> Christoph
>
An excellent question.  Anyone who runs Mathematica in serious 
applications could try it
and report back.

Unfortunately, SameQ doesn't operate the way I suspect you think it does.

Consider a = 1.100000000000000000000000000;   b=1.1

SameQ[a,b]  is True.

Yet a and b are different.  You can see this if you do 
SetPrecision[a,100] and SetPrecision[b,100].

1.10000000000000000000000000000000000000117549435082228750796873653722\
2245677818665556772087521508752

1.10000000000000008881784197001252323389053344726562500000000000000000\
0000000000000000000000000000000

RJF



  • Prev by Date: Re: Enterprise level Mathematica idea
  • Next by Date: Expectation function
  • 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?