Browse files

rationalize factor specfications before converting them into doubles

  • Loading branch information...
1 parent bfb4f65 commit 6459fb6b6e321659b341c5e3adb2432c5e9744cd @cddr cddr committed Sep 20, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 unit-class.lisp
@@ -28,7 +28,7 @@
(defmethod initialize-instance :after ((unit unit) &rest initargs)
(declare (ignore initargs))
(when (typep (factor-of unit) 'single-float)
- (setf (factor-of unit) (float (factor-of unit) 0d0))))
+ (setf (factor-of unit) (float (rationalize (factor-of unit)) 0d0))))
(defmethod print-object ((unit unit) stream)
(print-unreadable-object (unit stream :type t :identity nil)

0 comments on commit 6459fb6

Please sign in to comment.