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: [mg120255] Re: Numerical accuracy/precision - this is a bug or a feature?
  • From: James Stein <mathgroup at stein.org>
  • Date: Fri, 15 Jul 2011 04:08:44 -0400 (EDT)
  • References: <201107150121.VAA23720@smc.vnet.net>

Richard, thanks for pointing this out.
>From what you say, it seems that the documentation for SameQ is incorrect.

On Thu, Jul 14, 2011 at 6:21 PM, Richard Fateman
<fateman at eecs.berkeley.edu>wrote:

> 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: Help Plotting director fields
  • Next by Date: Re: Overriding the definition of Plus so that it does exact arithmetic: Bug or Feature?
  • 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?