Skip to content

Commit

Permalink
added extra abs to new unit-equal comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
iraikov committed Feb 22, 2016
1 parent a1a6f42 commit c31de6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unitconv.scm
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
(define (unit-equal? x y)
(and (= (quantity-int (unit-dims x))
(quantity-int (unit-dims y)))
(< (- (unit-factor x) (unit-factor y)) 1e-16)))
(< (abs (- (unit-factor x) (unit-factor y))) 1e-16)))


(define (unitless? u)
Expand Down

0 comments on commit c31de6d

Please sign in to comment.