Re: When Is Precision[ ] \$MachinePrecision, And When Is It Not?

• To: mathgroup at smc.vnet.net
• Subject: [mg47580] Re: When Is Precision[ ] \$MachinePrecision, And When Is It Not?
• From: drbob at bigfoot.com (Bobby R. Treat)
• Date: Fri, 16 Apr 2004 05:21:26 -0400 (EDT)
• References: <c5dhrd\$nqp\$1@smc.vnet.net> <c5gg7l\$att\$1@smc.vnet.net> <c5lfo0\$bt2\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Look up == in Help, and you'll find:

"SameQ requires exact correspondence between expressions, except that
it considers Real numbers equal if their difference is less than the
uncertainty of either of them."

N[2/3] == 2/3
N[2/3] === 2/3
True
False

Bobby

Harold.Noffke at wpafb.af.mil (Harold Noffke) wrote in message news:<c5lfo0\$bt2\$1 at smc.vnet.net>...
> 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[1]:= N[2/3]
>
> Out[1]= 0.666667
>
> In[2]:= N[2/3]==2/3
>
> Out[2]= True
>
> In[3]:= ?==
> lhs == rhs returns True if lhs and rhs are identical.
>
> Regards,
> Harold

```

• Prev by Date: Re: Alternative to defining 'operator' function?
• Next by Date: Re: Alternative to defining 'operator' function?
• Previous by thread: Re: When Is Precision[ ] \$MachinePrecision, And When Is It Not?
• Next by thread: Format Style