On Fri, Aug 20, 2010 at 14:26, bufo wrote:
> I am currently learning clojure by reading The Joy of Clojure and I
> have 2 questions on float opertions:
>
> - why does (+ 4.2 8.4) return 12.601 and (+ 1.5 2.6) 4.1?
> Since 4.2, 8.4 and (+ 4.2 8.4) are java Doubles why does it not behave
>
> - why does (+ 4.2 8.4) return 12.601 and (+ 1.5 2.6) 4.1?
> Since 4.2, 8.4 and (+ 4.2 8.4) are java Doubles why does it not behave
> as expected? What does clojure do in the background?
That's not a bug. Doubles have a standard. Clojure implementation
follows the standard.
(as most
This may help explain things:
http://groups.google.com/group/clojure/msg/325228e8b66923ac
Have all good days,
David Sletten
On Aug 20, 2010, at 8:26 AM, bufo wrote:
> I am currently learning clojure by reading The Joy of Clojure and I
> have 2 questions on float opertions:
>
> - why does (+ 4.