I can only reproduce this using 1.2 release.

under 1.3 master. I get

user=> (- 0 -9223372036854775808)
ArithmeticException integer overflow
clojure.lang.Numbers.throwIntOverflow (Numbers.java:1575)


On Sun, Dec 12, 2010 at 9:00 PM, James Koppel <darmanith...@gmail.com> wrote:
> user> (- 0 -9223372036854775808)
> -9223372036854775808
>
> It's worth noting that -9223372036854775808 is Long/MIN_VALUE, and
> that this is the expected result with native 64-bit longs, though not
> in a language with automatic long-to-BigInteger conversion. It appears
> that a few related bugs (e.g.: http://dev.clojure.org/jira/browse/CLJ-32)
> have been caught and fixed, but this one still lives.
>
> (I now appreciate why "How do you detect integer overflows?" is one of
> the favorite interview questions of the Software Engineering
> Institute.)
>
> Sincerely,
> James Koppel
>
> --
> 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



-- 
Omnem crede diem tibi diluxisse supremum.

-- 
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

Reply via email to