[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
**Subject**: **Re: Why do some math functions return -0**
**From**: Tony Finch <dot@...>
**Date**: Tue, 21 Sep 2010 08:54:32 +0100

On 21 Sep 2010, at 02:35, Mike Pall <mikelu-1009@mike.de> wrote:
>
> Also note that your finding is unrelated to the problem at hand
> (no constant folding, no change of rounding mode). There's some
> prior evidence of buggy or miscompiled floor/ceil for OSX/PPC:
>
That explains it :-) I was wrong to blame rounding in general, but that was the only explanation I could think of late at night for subtraction giving -0 in the default rounding mode (nearest). Inconsistent constant folding effects are a red herring too because they don't explain the weird behaviour of Lua (where compile time constants aren't involved) but broken floor() does explain that.
Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/

**References**:
**Why do some math functions return -0, ***Mike McGonagle*
**Re: Why do some math functions return -0, ***Drake Wilson*
**Re: Why do some math functions return -0, ***Mike McGonagle*
**Re: Why do some math functions return -0, ***KHMan*
**Re: Why do some math functions return -0, ***Mike McGonagle*
**Re: Why do some math functions return -0, ***Tony Finch*
**Re: Why do some math functions return -0, ***Mike McGonagle*
**Re: Why do some math functions return -0, ***Tony Finch*
**Re: Why do some math functions return -0, ***Tony Finch*
**Re: Why do some math functions return -0, ***Mike Pall*