On 9 April 2013 14:27, Rostislav Svoboda <rostislav.svob...@gmail.com> wrote:
> Can anyone explain me please why I get:
>
> Clojure 1.5.1
> user=> (* 148.52 0.0256)
> 3.8021120000000006
>
> The correct result should be:
> https://www.google.com/search?q=148.52+*+0.0256
> 3.802112

Plínio's answer is correct, but just to demonstrate this is not just
Clojure doing something stupid, here's Python doing the same thing:

Python 2.6.5 (r265:79063, Oct  1 2012, 22:04:36)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 148.52 * 0.0256
3.8021120000000006

and here's how you should be able to get exact values in Clojure:

user=> (* 148.52M 0.0256M)
3.802112M

> If you don't believe me try it on: http://tryclj.com/
>
> thx
>
> Bost

-- 
Michael Wood <esiot...@gmail.com>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to