MathGroup Archive 2005

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

Search the Archive

inconsistency with Inequality testing and Floor

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59927] inconsistency with Inequality testing and Floor
  • From: "Brett Patterson" <muckle.moose at gmail.com>
  • Date: Thu, 25 Aug 2005 06:34:44 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

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


  • Prev by Date: ControlSystems Wolfram application. Does it support root locus for discrete time systems?
  • Next by Date: Re: How to solve this type of equation in Mathematica?
  • Previous by thread: Re: ControlSystems Wolfram application. Does it support root locus for discrete time systems?
  • Next by thread: Re: inconsistency with Inequality testing and Floor