Test case for #260, floor div on floats
authorRobert Bradshaw <robertwb@math.washington.edu>
Sat, 28 Mar 2009 20:08:20 +0000 (13:08 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sat, 28 Mar 2009 20:08:20 +0000 (13:08 -0700)
tests/run/float_floor_division_T260.pyx [new file with mode: 0644]

diff --git a/tests/run/float_floor_division_T260.pyx b/tests/run/float_floor_division_T260.pyx
new file mode 100644 (file)
index 0000000..1843d49
--- /dev/null
@@ -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