Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5B26896E0 for ; Sun, 5 Aug 2012 02:38:03 +0000 (UTC) Received: (qmail 36797 invoked by uid 500); 5 Aug 2012 02:38:03 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 36654 invoked by uid 500); 5 Aug 2012 02:38:03 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 36585 invoked by uid 99); 5 Aug 2012 02:38:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Aug 2012 02:38:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Aug 2012 02:38:00 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 441C6238897F for ; Sun, 5 Aug 2012 02:37:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1369514 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/util/FastMathTestPerformance.java Date: Sun, 05 Aug 2012 02:37:16 -0000 To: commits@commons.apache.org From: erans@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120805023716.441C6238897F@eris.apache.org> Author: erans Date: Sun Aug 5 02:37:15 2012 New Revision: 1369514 URL: http://svn.apache.org/viewvc?rev=1369514&view=rev Log: MATH-840 Fixed invalid argument to "asin" and "acos". Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/util/FastMathTestPerformance.java Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/util/FastMathTestPerformance.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/util/FastMathTestPerformance.java?rev=1369514&r1=1369513&r2=1369514&view=diff ============================================================================== --- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/util/FastMathTestPerformance.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/util/FastMathTestPerformance.java Sun Aug 5 02:37:15 2012 @@ -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));