Because the literal is readed as BigInt: user=> (class 6546546546546546546850348954895480584039545804 ) clojure.lang.BigInt
2015-09-04 22:48 GMT+08:00 Ali M <tclwarr...@gmail.com>: > 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. > -- 庄晓丹 Email: killme2...@gmail.com xzhu...@avos.com Site: http://fnil.net Twitter: @killme2008 -- 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.