Details

Type: Defect

Status: Closed

Priority: Minor

Resolution: Completed

Affects Version/s: None

Fix Version/s: None

Component/s: None

Labels:None
Description
sqrtratio checks twice if sqrtnum is a floatingpoint number:
(defn sqrtratio [^clojure.lang.Ratio n] (if (neg? n) Double/NaN (let [numerator (.numerator n), denominator (.denominator n), sqrtnum (sqrt numerator)] (if (float? sqrtnum) (Math/sqrt n) (let [sqrtden (sqrt denominator)] (if (float? sqrtnum) (Math/sqrt n) (/ sqrtnum sqrtden)))))))
The second check should be a check for the type of sqrtden or the check(s) should be removed (and let / do the job).
Activity
Mark Engelberg
made changes 
Field  Original Value  New Value 

Status  Open [ 1 ]  Resolved [ 5 ] 
Resolution  Completed [ 1 ] 
Mark Engelberg
made changes 
Status  Resolved [ 5 ]  Closed [ 6 ] 
Fixed and released as 0.0.3