|
[Date Index]
[Thread Index]
[Author Index]
Re: Distinguishable From 1.0
- To: mathgroup at smc.vnet.net
- Subject: [mg47740] Re: [mg47719] Distinguishable From 1.0
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Sat, 24 Apr 2004 04:15:41 -0400 (EDT)
- References: <200404230630.CAA03243@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Harold Noffke wrote:
> $Version "5.0 for Microsoft Windows [2000] (November 18, 2003)"
>
> MathGroup:
>
> According to MathBook documentation ...
>
> "$MachineEpsilon gives the smallest machine-precision number which can
> be added to 1.0 to give a result that is distinguishable from 1.0."
>
> The results below suggest that becoming "... distinguishable from 1.0"
> does not occur until slightly under 1.5 * $MachineEpsilon.
>
> Is there a misstatement here, or am I misunderstanding something about
> being "... distinguishable from 1.0"?
>
> In[1]:= 1. + 1.0 * $MachineEpsilon === 1.
> Out[1]= True
>
> In[2]:= 1. + 1.1 * $MachineEpsilon === 1.
> Out[2]= True
>
> In[3]:= 1. + 1.2 * $MachineEpsilon === 1.
> Out[3]= True
>
> In[4]:= 1. + 1.3 * $MachineEpsilon === 1.
> Out[4]= True
>
> In[5]:= 1. + 1.4 * $MachineEpsilon === 1.
> Out[5]= True
>
> In[6]:= 1. + 1.5 * $MachineEpsilon === 1.
> Out[6]= False
>
> Regards,
> Harold
>
Now take into account what SameQ does:
"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."
A pair of machine numbers that differ only in the last bit are thus
regarded as SameQ. Your 1. + 1.5 * $MachineEpsilon was the first value
above that differed by more than one bit from 1. InputForm will give a
clue that this is the case, but it may be discerned with more certainty
by checking RealDigits[number,2].
Daniel Lichtblau
Wolfram Research
Prev by Date:
Re: Problem with NIntegrte
Next by Date:
Re: undocumented function StringQ
Previous by thread:
Distinguishable From 1.0
Next by thread:
Re: Distinguishable From 1.0
|