From: Robert Bradshaw Date: Sat, 28 Mar 2009 20:08:20 +0000 (-0700) Subject: Test case for #260, floor div on floats X-Git-Tag: 0.12.alpha0~334^2~2^2~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=42bd9268567a92b5c4908f541dfad04e98cced08;p=cython.git Test case for #260, floor div on floats --- diff --git a/tests/run/float_floor_division_T260.pyx b/tests/run/float_floor_division_T260.pyx new file mode 100644 index 00000000..1843d496 --- /dev/null +++ b/tests/run/float_floor_division_T260.pyx @@ -0,0 +1,13 @@ +__doc__ = u""" + >>> floor_div_float(2, 1.5) + 1.0 + >>> floor_div_float(2, -1.5) + -2.0 + >>> floor_div_float(-2.3, 1.5) + -2.0 + >>> floor_div_float(1e10, 1e-10) + 1e+20 +""" + +def floor_div_float(double a, double b): + return a // b