From: bob brown on
Why does the statement lt(0.24 - 0.22, 0.02) return 1?

lt(0.02,0.02) returns 1 also...
From: TideMan on
On Feb 15, 7:11 pm, "bob brown" <airforce...(a)lavabit.com> wrote:
> Why does the statement lt(0.24 - 0.22, 0.02) return 1?
>
> lt(0.02,0.02) returns 1 also...

Welcome to floating point arithmetic.
Every new boy makes this "discovery" and makes a fool of himself by
posting to CSSM.
Have a look here:
http://www.mathworks.com/support/tech-notes/1100/1108.html

From: James Tursa on
"bob brown" <airforceone(a)lavabit.com> wrote in message <hlaohn$fi0$1(a)fred.mathworks.com>...
>
> lt(0.02,0.02) returns 1 also...

Really? Try it again ... *exactly* as you have typed it.
From: Jan Simon on
Dear Bob!

> Why does the statement lt(0.24 - 0.22, 0.02) return 1?
> lt(0.02,0.02) returns 1 also...

If "lt(0.02, 0.02)" really replies 1, I assume, that you have created a function called "lt", which shadows Matlab's toolbox function LT.
Please try this to find all instances of function called "lt":
which('lt', '-all')

Good luck, Jan