diff --git a/core/math/floats/floats-tests.factor b/core/math/floats/floats-tests.factor index bd3f951b02..dbdd5b27fe 100644 --- a/core/math/floats/floats-tests.factor +++ b/core/math/floats/floats-tests.factor @@ -60,3 +60,5 @@ unit-test [ 0 ] [ 1/0. >bignum ] unit-test [ t ] [ 64 [ 2^ 0.5 * ] map [ < ] monotonic? ] unit-test + +[ 5 ] [ 10.5 1.9 /i ] unit-test diff --git a/core/math/floats/floats.factor b/core/math/floats/floats.factor index 9dcff9eb90..2a22dc4330 100644 --- a/core/math/floats/floats.factor +++ b/core/math/floats/floats.factor @@ -24,6 +24,7 @@ M: float - float- ; M: float * float* ; M: float / float/f ; M: float /f float/f ; +M: float /i float/f >integer ; M: float mod float-mod ; M: real abs dup 0 < [ neg ] when ;