Re: Math.mutiplyHigh() is signed

2020-06-23 Thread Raffaello Giulietti
Hi, in defense of the current spec, integer arithmetic is signed by default and unsigned behavior is evident from the method names, like Long::compareUnsigned or Long::divideUnsigned But your spec is even clearer ;-) Greetings Raffaello In retrospect I don't know why I expected Math.mul

Math.mutiplyHigh() is signed

2020-06-23 Thread David Lloyd
In retrospect I don't know why I expected Math.multiplyHigh() to return the high word of the unsigned product of two 64-bit numbers, given that long is signed; in my defence however, the docs don't actually seem to specify. WDYT about a patch like this to clarify? diff --git a/src/java.base/share