Reported by jbondeson, Jan 30, 2009
Originally discussed here:
The current implementation of conversion of clojure.lang.Ratio class
to a fixed precision floating point value is not what one would expect.
user> (double (/ (expt 2 1024) 3))
when in fact it should return: 5.992310449541053E307
Attached is the fix for the Ratio class to allow for the proper conversion
to a double or float by using a BigDecimal division with a fixed precision.
Additionally, I sent in my CA on Monday, so it should be there anytime now.
1.0 KB Download
Comment 1 by richhickey, Feb 09, 2009
patch applied - svn 1256 - thanks!