OpenJDK 11: Merging in java.lang.Math
This is part of merging upstream changes from OpenJDK 11.28. This CL
updates java.lang.Math; and adds unit tests for both
java.lang.Math and java.lang.StrictMath; and some methods from
java.lang.Float and java.lang.Double.
There are two new APIs added for fused multiply add in Math:
* double fma(double, double, double)
* float fma(float, float, float)
Also add test coverage for java.lang.Math class, specifically:
* Math.abs
* Math.atan2
* Math.nextUp(float)
* Math.nextUp(double)
* Math.nextDown(float)
* Math.nextDown(double)
* Math.ceil
* Math.floor
* Math.cbrt
* Math.floorDiv(int, int)
* Math.floorDiv(long, long)
* Math.floorDiv(long, int)
* Math.addExact(int, int)
* Math.addExact(long, long)
* Math.addExact(long, int)
* Math.exp
* Math.expm1
* Math.fma(float, float, float)
* Math.fma(double, double, double)
* Math.sinh
* Math.cosh
* Math.tanh
* Math.hypot
* Math.getExponent(float)
* Math.getExponent(double)
* Math.nextAfter(float, double)
* Math.nextAfter(double, double)
* Math.copySign(float, float)
* Math.copySign(double, double)
* Math.scalb(float, int)
* Math.scalb(double, int)
* Math.ulp(float)
* Math.ulp(double)
* Math.signum(float)
* Math.signum(double)
* Math.lop1p
* Math.log10
* Math.min
* Math.max
* Math.multiplyHigh
* Math.pow
* Math.rint
* Math.round
* Math.sin
* Math.cos
* Math.tan
* Math.log
* Math.asin
* Math.acos
* Math.atan
* Math.pow2
Test coverage for java.lang.StrictMath includes:
* StrictMath.atan2
* StrictMath.nextUp(float)
* StrictMath.nextUp(double)
* StrictMath.floor
* StrictMath.ceil
* StrictMath.cbrt
* StrictMath.floorDiv(int, int)
* StrictMath.floorDiv(long, long)
* StrictMath.floorDiv(long, int)
* StrictMath.exp
* StrictMath.expm1
* StrictMath.fma(float, float, float)
* StrictMath.fma(double, double, double)
* StrictMath.sinh
* StrictMath.cosh
* StrictMath.tanh
* StrictMath.hypot
* StrictMath.getExponent
* StrictMath.nextAfter(float,double)
* StrictMath.nextAfter(double,double)
* StrictMath.nextDown(float)
* StrictMath.nextDown(double)
* StrictMath.copySign(float,float)
* StrictMath.copySign(double, double)
* StrictMath.scalb(float, int)
* StrictMath.scalb(double, int)
* StrictMath.ulp(float)
* StrictMath.ulp(double)
* StrictMath.signum(float)
* StrictMath.signum(double)
* StrictMath.lop1p
* StrictMath.log10
* StrictMath.pow
* StrictMath.rint
* StrictMath.round
* StrictMath.tan
* StrictMath.log
* StrictMath.sin
* StrictMath.asin
* StrictMath.acos
* StrictMath.atan
* StrictMath.pow2
Test coverage for java.lang.Float:
* Float.isNaN(float)
* Float.isFinite(float)
* Float.isInfinite(float)
Test coverage for java.lang.Double:
* Double.isNaN(double)
* Double.isFinite(double)
* Double.isInfinite(double)
Bug: 199373643
Test: atest CtsLibcoreOjTestCases:test.java.lang.Math.*
Change-Id: Ic0cb0a17fd853c7e33e99d9dd61af91bf9049eb1
27 files changed