[Nickle] Bug in //

Bart Massey nickle@nickle.org
Wed, 11 Dec 2002 13:44:18 -0800


Ouch.  Fixed.

	Bart

In message <15863.39087.944672.140221@scream.east.isi.edu> you wrote:
> I've found a bug in the implementation of the // operator.
> 
> The specification says:
> 
> 	x // y == floor(x / y)
> 
> which holds for some cases:
> 
> 	> x = -3; y = 4;
> 	> floor(x / y)
> 	-1
> 	> x // y
> 	-1
> 
> but not for others:
> 
> 	> x = 3; y = -4;
> 	> floor(x / y)
> 	-1
> 	> x // y
> 	0
> 
> -Carl
> 
> PS. Yes, this should explain why I kept failing in my attempts to
> write a C function whose behavior matched the nickle // operator.
> 
> _______________________________________________
> Nickle mailing list
> Nickle@nickle.org
> http://nickle.org/mailman/listinfo/nickle
>