Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
This issue concerns the FastMath class and its test class.
(1) In the double pow(double, double) function, there are 2 identical "if" blocks. The second one can be suppressed.
if (y < 0 && y == yi && (yi & 1) == 1)
// this block is never used -> to be suppressed
if (y < 0 && y == yi && (yi & 1) == 1)
if (y > 0 && y == yi && (yi & 1) == 1) { return -0.0; }
(2) To obtain better code coverage, we added some tests case in FastMathTest.java (see attached file)
- Added test for log1p
- Added tests in testPowSpecialCases()
- Added tests for a 100% coverage of acos().
- Added tests for a 100% coverage of asin().