From 42bd9268567a92b5c4908f541dfad04e98cced08 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 28 Mar 2009 13:08:20 -0700 Subject: [PATCH] Test case for #260, floor div on floats --- tests/run/float_floor_division_T260.pyx | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/run/float_floor_division_T260.pyx 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 -- 2.26.2