lua-users home
lua-l archive

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


On 20 Sep 2010, at 09:18, David Kastrup <dak@gnu.org> wrote:

Tony Finch <dot@dotat.at> writes:

It can happen if the rounding mode is towards negative infinity.

Please point out the line in question where this would apply.

There are lots of subtractions in the code.

And explain why the rounding mode should be set towards negative
infinity.

I think the original poster might be able to explain the problem (or rule out some explanations) by looking at their floating point environment in more detail. IIRC common implementations of floor() alter the rounding mode in order to work, so you might need to test it in more than one place to be sure everything is as expected.

It would be nice if you could try to help instead of flaming.