Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: A bug in SameQ

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23396] Re: A bug in SameQ
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Fri, 5 May 2000 02:07:37 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <8er8vj$hd5@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Does this have anything to do with -0 not necessarily being 0 in machine
hardware?

"Ersek, Ted R" wrote:
> 
> I use Mathematica Version 4.0.1.0 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.
> -------------------
> 
> In[1]:=
> x1= $MinMachineNumber;
> x2= x1(1+$MachineEpsilon);
> 
> In[3]:=
> {x1===x2, -x1 === -x2}
> 
> Out[3]=
> {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!
> 
> --------------------
> Regards,
> Ted Ersek
> 
> See my Mathematica tips, tricks at
> http://www.verbeia.com/mathematica/tips/Tricks.html

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.       phone 413 549-1020 (H)
Univ. of Massachusetts                     413 545-2859 (W)
Amherst, MA 01003-4515


  • Prev by Date: Re: The most efficient Fibonacci algorithim?
  • Next by Date: Re: The most efficient Fibonacci algorithim?
  • Previous by thread: A bug in SameQ
  • Next by thread: Question: Fitting numerical solutions of ord. diff. equ.