     dup 1 number= [ drop ] [ <ratio> ] if ; inline
 
 : scale ( a/b c/d -- a*d b*c )
-    2>fraction >r * swap r> * swap ; inline
+    2>fraction [ * swap ] dip * swap ; inline
 
 : ratio+d ( a/b c/d -- b*d )
-    denominator swap denominator * ; inline
+    [ denominator ] bi@ * ; inline
 
 PRIVATE>
 

        "Division by zero" throw
    ] [
        dup 0 < [ [ neg ] bi@ ] when
        2dup gcd nip tuck /i >r /i r> fraction>
    ] if ;

M: ratio hashcode*


M: ratio + 2dup scale + -rot ratio+d / ;
M: ratio - 2dup scale - -rot ratio+d / ;
M: ratio * 2>fraction * [ * ] dip / ;
M: ratio / scale / ;
M: ratio /i scale /i ;
M: ratio /f scale /f ;
