[Nickle] Bugs using // with large negative dividend
Carl Worth
nickle@nickle.org
Fri, 13 Dec 2002 11:11:47 -0500
Here's some more mystic behavior of the // operator.
When the magnitude of a negative dividend exceeds some threshold, the
direction of the rounding changes:
> a=-200000000;
> b=-3;
> a//b
66666666
> 10*a//b
666666667
> a=-200000000;
> b=3
> a//b
-66666667
> 10*a//b
-666666666
Positive dividends do not appear to tickle the bug.
Also, results yielding a fractional part less than 0.5 seem to be
unaffected as well.
-Carl
PS. I don't know whether my attempt to validate the trapezoid
implementation using nickle is finding more bugs in the trapezoid code
or in nickle. ;-)