why?

<REPL>
user=> (+ 6546546546546546546850348954895480584039545804 
7548979534287548957345843954749357348757897)
6554095526080834095807694798850229941388303701N

user=> (+ Long/MAX_VALUE Long/MAX_VALUE)

ArithmeticException integer overflow  clojure.lang.Numbers.throwIntOverflow 
(Numbers.java:1501)

user=> Long/MAX_VALUE
9223372036854775807
</REPL>

Why the much bigger numbers get promoted, and a smaller number overflows?

Thank you
Ali

-- 
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/d/optout.

Reply via email to