This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: bug: remainder may return negative values
Per Bothner a écrit :
> > #|kawa:2|# (invoke 14853098166355272004 'longValue)
> > -3593645907354279612
>
14853098166355272004 is just to high for a SIGNED longValue.
As the highest bit (sign bit) is set to 1, this number is seen as negative
number.
Note: Long.MAX_VALUE = 922337203854775807 which is smaller
than 14853098166355272004.
14853098166355272004
09223372036854775807
Voilà !