fixed small bug in rationalize
This commit is contained in:
parent
c64fda7619
commit
476a0cb6d8
|
@ -3266,7 +3266,7 @@
|
||||||
(let ([n (numerator x)] [d (denominator x)]
|
(let ([n (numerator x)] [d (denominator x)]
|
||||||
[n^ (numerator y)] [d^ (denominator y)])
|
[n^ (numerator y)] [d^ (denominator y)])
|
||||||
(- (simplest^ (- n^) d^ (- n) d)))]
|
(- (simplest^ (- n^) d^ (- n) d)))]
|
||||||
[else 1]))
|
[else 0]))
|
||||||
(define (simplest^ n d n^ d^)
|
(define (simplest^ n d n^ d^)
|
||||||
(let-values ([(q r) (div-and-mod n d)])
|
(let-values ([(q r) (div-and-mod n d)])
|
||||||
(if (= r 0)
|
(if (= r 0)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1584
|
1585
|
||||||
|
|
Loading…
Reference in New Issue