On Thu, Oct 02, 2003 at 10:35:29AM +0200, Leopold Toetsch wrote:
> Adam Thomason <[EMAIL PROTECTED]> wrote:

> > The one remaining test failure in 'make test' is op/number test 10,
> > the second part of which computes mod(0.0,3.0).  The expected value is
> > 0.0, but I see -0.0.  However, given the definition of
> > mod(x,y)=x-y*floor(x/y), this case reduces to 0.0-0.0*0.0, which could
> > justify -0.0.  Perhaps the test can be relaxed somehow to accomodate
> > minus-zero semantics.
> 
> Sounds correct, yes.

Relaxing that test doesn't feel right to me. Partly in black box terms
because I would expect putting strictly non-negative values into mod
shouldn't create a negative zero, and partly in terms of that implementation
because I thought that negative zero was only allowed to arise as the result
of division and multiplication, never from addition or *in this case)
subtraction.

Nicholas Clark

Reply via email to