Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove large powers of two before passing arguments to gcd. This showed up in this code for log of exact arguments: (let* ((wn (##integer-length (##numerator x))) (wd (##integer-length (##denominator x))) (p (##fx- wn wd)) (float-p (##fixnum->flonum p)) (partial-result (##fllog (##exact->inexact (##* x (##expt 2 (##fx- p))))))) ;; <<< (##fl+ (##fl* float-p (macro-inexact-log-2)) partial-result))) At <<< we can be multiplying a bignum with 1/2^p, with p large, and rational normalization requires a gcd of that bignum with 2^p. This is an important enough special case that we should fix the code.
- Loading branch information