[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [Bug?] 0 vs -0 / Incorrect Optimization or Parsing
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 29 Jul 2009 15:14:52 -0300
> Err, but this is a genuine bug, not a new feature.
I agree it's annoying but I don't think it's a bug: Lua is based on C89
which (unlike C99) does not say much about floating-point types; there's
certainly no mention of negative 0 and signed infinities. The only way
to distinguish -0 from 0 is to compute their inverses, which is clearly
a troublesome operation if you're not running on IEEE 754 hardware.
> IMHO a fix for it should be merged into Lua 5.1.5 (like all the other
> pending bug fixes).
It probably will if there is a Lua 5.1.5 (also probable).