[Date Index] [Thread Index] [Author Index]
Re: Re: When Is Precision[ ] $MachinePrecision, And When Is It Not?
Evidently the exact value 2/3 on the right of N[2/3]==2/3 is converted to floating point before the comparison is made. (Same thing happens, for example, in 3.1 + 2/3) But: N[2/3]===2/3 False Look up == (or Equal) and === (SameQ) in the HelpBrowser. Harold Noffke wrote: > Bobby: > > Thanks for your examples. I thought about them, and found a very > short one which still bothers me, because the answer is not what I > expected ... > > In:= N[2/3] > > Out= 0.666667 > > In:= N[2/3]==2/3 > > Out= True > > In:= ?== > lhs == rhs returns True if lhs and rhs are identical. > > Regards, > Harold > > -- Murray Eisenberg murray at math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305