From 96884eab2ad7b7ef74c004ad2b361056e0ad4cee Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Thu, 5 Jun 2014 10:53:02 -0700 Subject: [PATCH] math.ratios: faster abs and neg? on ratios. --- basis/math/ratios/ratios.factor | 2 ++ 1 file changed, 2 insertions(+) diff --git a/basis/math/ratios/ratios.factor b/basis/math/ratios/ratios.factor index cb6dc29760..70969cad43 100644 --- a/basis/math/ratios/ratios.factor +++ b/basis/math/ratios/ratios.factor @@ -77,3 +77,5 @@ M: ratio /i scale /i ; M: ratio /f scale /f ; M: ratio mod scale+d [ mod ] [ / ] bi* ; M: ratio /mod scale+d [ /mod ] [ / ] bi* ; +M: ratio abs dup neg? [ >fraction [ neg ] dip fraction> ] when ; +M: ratio neg? numerator neg? ; inline