From 9835ce4b0361815f7ec1d2d379a23e9bc627dd14 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 30 Apr 2005 04:59:56 +0000 Subject: [PATCH] fix floor/ceiling words --- library/alien/structs.factor | 2 +- library/math/ratio.factor | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/alien/structs.factor b/library/alien/structs.factor index f9212c7073..ff5fe835d1 100644 --- a/library/alien/structs.factor +++ b/library/alien/structs.factor @@ -39,7 +39,7 @@ math namespaces parser strings words ; : array-constructor ( width -- ) #! Make a word ( n -- byte-array ). "struct-name" get "-array" cat2 constructor-word - swap cell / ceiling [ * ] cons + swap [ * ] cons define-compound ; : define-nth ( width -- ) diff --git a/library/math/ratio.factor b/library/math/ratio.factor index 5655dc705c..720dcb2ef0 100644 --- a/library/math/ratio.factor +++ b/library/math/ratio.factor @@ -39,5 +39,5 @@ M: ratio /i scale /i ; M: ratio /f scale /f ; M: ratio truncate >fraction /i ; -M: ratio floor >fraction /mod dup 0 < [ 1 - ] when ; -M: ratio ceiling >fraction /mod dup 0 > [ 1 + ] when ; +M: ratio floor >fraction /i dup 0 < [ 1 - ] when ; +M: ratio ceiling >fraction /i dup 0 > [ 1 + ] when ;