aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Engelberg <mark.engelberg@gmail.com>2011-05-21 02:56:20 -0700
committerMark Engelberg <mark.engelberg@gmail.com>2011-05-21 02:56:20 -0700
commitc46df9da78de1baad9c32ac5318509446d55341c (patch)
tree74a81e59530807906caf32600b272b7911b2643d
parent5ebf594d0b219baf01acb85a88f27952adf1f7f2 (diff)
Math: Fixed breakages caused by 1.3's change to primitive math
-rw-r--r--modules/math/src/main/clojure/clojure/contrib/math.clj4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/math/src/main/clojure/clojure/contrib/math.clj b/modules/math/src/main/clojure/clojure/contrib/math.clj
index 47629139..807468cf 100644
--- a/modules/math/src/main/clojure/clojure/contrib/math.clj
+++ b/modules/math/src/main/clojure/clojure/contrib/math.clj
@@ -175,7 +175,7 @@ round always returns an integer. Rounds up for values exactly in between two in
(throw (IllegalArgumentException. "lcm requires two integers")))
(cond (zero? a) 0
(zero? b) 0
- :else (abs (* b (quot a (gcd a b))))))
+ :else (abs (*' b (quot a (gcd a b))))))
; Length of integer in binary, used as helper function for sqrt.
(defmulti ^{:private true} integer-length class)
@@ -196,7 +196,7 @@ round always returns an integer. Rounds up for values exactly in between two in
(let [n-len (integer-length n)]
(loop [init-value (if (even? n-len)
(expt 2 (quot n-len 2))
- (expt 2 (inc (quot n-len 2))))]
+ (expt 2 (inc' (quot n-len 2))))]
(let [iterated-value (quot (+' init-value (quot n init-value)) 2)]
(if (>= iterated-value init-value)
init-value