On Thu, Jan 8, 2009 at 2:07 PM, Achim Passen <[email protected]> wrote:
>
> Hi all!
>
> I encountered some corner cases where overflow checking for "-"
> doesn't work as I would expect:
>
> user=> (- Integer/MAX_VALUE Integer/MIN_VALUE)
> -1
> user=> (- Long/MAX_VALUE Long/MIN_VALUE)
> -1
>
> The problem seems to be that negating MIN_VALUE yields MIN_VALUE
> again, so it slips through the overflow check (see below).
>
> Shall I add that to the issues list?

I think you should go ahead.  I don't see how this could not be a bug.

--Chouser

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to