Le jeu. 9 avr. 2020 à 22:20, Alex Herbert <[email protected]> a écrit :
>
>
>
> > On 9 Apr 2020, at 16:32, Gilles Sadowski <[email protected]> wrote:
> >
> >
> >
> >> Given this I am thinking that using ZERO when possible is a better
> >> option and avoid 0 / -1.
> >
> > Hmm, then I'm both +0 and -0 (which is the same, right?)
> > on this issue. ;-)
>
> Ironically the conversion to a double is a minor bug:
>
> Fraction.of(0, 1).doubleValue() == 0.0
> Fraction.of(0, -01).doubleValue() == -0.0
>
> IEEE754 arithmetic for 0.0 / -1.0 creates a -0.0.
>
> Do we want to support -0.0?

Why prevent it since it looks expected from the above call?

Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to