MathGroup Archive 2005

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

Search the Archive

Re: inconsistency with Inequality testing and Floor

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59940] Re: inconsistency with Inequality testing and Floor
  • From: snoofly <snoofly at snoofly.com>
  • Date: Fri, 26 Aug 2005 04:53:29 -0400 (EDT)
  • References: <dek8a1$aao$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Brett Patterson wrote:
> I have observed the following strange behaviour:
> 
> ----------------------
> In[1]:=   x = 1.0 - 10^-($MachinePrecision)
> 
> Out[1]=   1.
> 
> In[2]:=   x >= 1
> 
> Out[2]=   True
> 
> In[3]:=   Floor[x]
> 
> Out[3]=   0
> ----------------------
> 
> It seems that the inequality test and Floor use different numerical
> methods.
> I think this behaviour is inconsistent.
> If the test "x >= 1" evaluates to True, then Floor[x] should evaluate
> to 1.
> 
> Can anyone shed any light on this?
> 
> Regards,
> Brett Patterson
> 
> School of Physics, University of Western Australia; and
> Institute of Photonics, University of Strathclyde, Scotland
> 
Interesting. On my computer:
$MachinePrecision
15.9546
1 - 10^-13.84908041702 >= 1
False
1 - 10^-13.84908041703 >= 1
True
I wonder what the significance of this number is..


  • Prev by Date: Re: The updated version of Notations Package
  • Next by Date: Re: Hi, a simple question, thanks
  • Previous by thread: Re: inconsistency with Inequality testing and Floor
  • Next by thread: Re: inconsistency with Inequality testing and Floor