You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2021/05/08 13:30:49 UTC

[commons-math] 01/02: Javadoc.

This is an automated email from the ASF dual-hosted git repository.

erans pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-math.git

commit 0a9fe383a3b55d7910fcb975a6a7e2e02de336d7
Author: Gilles Sadowski <gi...@gmail.com>
AuthorDate: Sat May 8 15:29:54 2021 +0200

    Javadoc.
---
 src/main/java/org/apache/commons/math4/util/FastMath.java | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/math4/util/FastMath.java b/src/main/java/org/apache/commons/math4/util/FastMath.java
index 4d0568a..eb235a5 100644
--- a/src/main/java/org/apache/commons/math4/util/FastMath.java
+++ b/src/main/java/org/apache/commons/math4/util/FastMath.java
@@ -23,8 +23,14 @@ import org.apache.commons.math4.exception.MathArithmeticException;
 import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
- * Faster, more accurate, portable alternative to {@link Math} and
- * {@link StrictMath} for large scale computation.
+ * Portable alternative to {@link Math} and {@link StrictMath}.
+ * <p>
+ * Caveat: At the time of implementation, the {@code FastMath} functions
+ * were often faster and/or more accurate than their JDK equivalent.
+ * Nowadays, it would not be surprising that they are always slower (due
+ * to the various JVM optimizations that have appeared since Java 5).
+ * However, any change to this class should ensure that the current
+ * accuracy is not lost.
  * <p>
  * FastMath is a drop-in replacement for both Math and StrictMath. This
  * means that for any method in Math (say {@code Math.sin(x)} or