mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8188044: We need Math.unsignedMultiplyHigh
Reviewed-by: rriggs, aph, darcy
This commit is contained in:
parent
3d84398d12
commit
ca4bea4665
3 changed files with 81 additions and 10 deletions
|
@ -982,6 +982,7 @@ public final class StrictMath {
|
|||
* @param x the first value
|
||||
* @param y the second value
|
||||
* @return the result
|
||||
* @see #unsignedMultiplyHigh
|
||||
* @see Math#multiplyHigh(long,long)
|
||||
* @since 9
|
||||
*/
|
||||
|
@ -989,6 +990,21 @@ public final class StrictMath {
|
|||
return Math.multiplyHigh(x, y);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns as a {@code long} the most significant 64 bits of the unsigned
|
||||
* 128-bit product of two unsigned 64-bit factors.
|
||||
*
|
||||
* @param x the first value
|
||||
* @param y the second value
|
||||
* @return the result
|
||||
* @see #multiplyHigh
|
||||
* @see Math#unsignedMultiplyHigh(long,long)
|
||||
* @since 18
|
||||
*/
|
||||
public static long unsignedMultiplyHigh(long x, long y) {
|
||||
return Math.unsignedMultiplyHigh(x, y);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the largest (closest to positive infinity)
|
||||
* {@code int} value that is less than or equal to the algebraic quotient.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue