Fixed invalid argument to "asin" and "acos".


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1369514 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gilles Sadowski 2012-08-05 02:37:15 +00:00
parent b6e62ab83a
commit 4104b21368
1 changed files with 6 additions and 6 deletions

View File

@ -209,19 +209,19 @@ public class FastMathTestPerformance {
double x = 0;
long time = System.nanoTime();
for (int i = 0; i < RUNS; i++)
x += StrictMath.asin(i / 10000000.0);
x += StrictMath.asin(i / (double) RUNS);
long strictTime = System.nanoTime() - time;
x = 0;
time = System.nanoTime();
for (int i = 0; i < RUNS; i++)
x += FastMath.asin(i / 10000000.0);
x += FastMath.asin(i / (double) RUNS);
long fastTime = System.nanoTime() - time;
x = 0;
time = System.nanoTime();
for (int i = 0; i < RUNS; i++)
x += Math.asin(i / 10000000.0);
x += Math.asin(i / (double) RUNS);
long mathTime = System.nanoTime() - time;
report("asin",strictTime,fastTime,mathTime);
@ -257,19 +257,19 @@ public class FastMathTestPerformance {
double x = 0;
long time = System.nanoTime();
for (int i = 0; i < RUNS; i++)
x += StrictMath.acos(i / 10000000.0);
x += StrictMath.acos(i / (double) RUNS);
long strictTime = System.nanoTime() - time;
x = 0;
time = System.nanoTime();
for (int i = 0; i < RUNS; i++)
x += FastMath.acos(i / 10000000.0);
x += FastMath.acos(i / (double) RUNS);
long fastTime = System.nanoTime() - time;
x = 0;
time = System.nanoTime();
for (int i = 0; i < RUNS; i++)
x += Math.acos(i / 10000000.0);
x += Math.acos(i / (double) RUNS);
long mathTime = System.nanoTime() - time;
report("acos",strictTime,fastTime,mathTime);
Assert.assertTrue(!Double.isNaN(x));