MathGroup Archive 2000

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

Search the Archive

A bug in SameQ

  • To: mathgroup at
  • Subject: [mg23356] A bug in SameQ
  • From: "Ersek, Ted R" <ErsekTR at>
  • Date: Thu, 4 May 2000 02:59:23 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

I use Mathematica Version under Windows 98.
For me SameQ gives contradicting results about x1 and x2 (two numbers close
to zero). Certain other platforms probably have the same problem.

x1= $MinMachineNumber;
x2= x1(1+$MachineEpsilon);

{x1===x2, -x1 === -x2}

{True, False}

This shows that even the most fundamental features are not completely free
of problems. Also notice Equal uses a different test and doesn't give
contradicting results in this case.

WRI Tech Support already confirmed that this is a bug, so don't bother
forwarding it to them. I certainly hope they will make sure the next version
does this correctly on all platforms!

Ted Ersek

See my Mathematica tips, tricks at

  • Prev by Date: The most efficient Fibonacci algorithim?
  • Next by Date: Re: collect derivatives
  • Previous by thread: Re: The most efficient Fibonacci algorithim?
  • Next by thread: Re: A bug in SameQ