lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


You're quite right, but I think for most people all these things are equally weird. I'm one of them :)

On Tue, Mar 25, 2008 at 2:59 PM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> One has to live with all kinds of weird things
> even when using standard FP alone.
>
> Let x be  FP number with x~=x+1, but y==y+1 for y=x+1. Then
> assert(x+1==y+1) -- passes
> assert(x==y) -- fails

This is a quite different kind of weird thing. It only means that
increment is not an injective function.

Besides, the idiosyncrasies of IEEE floating point are well studied (one
can say they were even well designed) and documented. To add a new set
of idiosyncrasies into Lua arithmetic opens a whole new world...

-- Roberto