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 2020/07/21 18:18:54 UTC
[commons-numbers] branch master updated: 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-numbers.git
The following commit(s) were added to refs/heads/master by this push:
new e7e3bfb Javadoc.
new 329efa7 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-numbers
e7e3bfb is described below
commit e7e3bfbb6d311bf693381ff3d9339f88814da388
Author: Gilles Sadowski <gi...@gmail.com>
AuthorDate: Tue Jul 21 20:11:43 2020 +0200
Javadoc.
First sentence modified so that it appears correctly on the HTML rendered page.
---
.../org/apache/commons/numbers/core/Precision.java | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/commons-numbers-core/src/main/java/org/apache/commons/numbers/core/Precision.java b/commons-numbers-core/src/main/java/org/apache/commons/numbers/core/Precision.java
index 7acce24..686bd31 100644
--- a/commons-numbers-core/src/main/java/org/apache/commons/numbers/core/Precision.java
+++ b/commons-numbers-core/src/main/java/org/apache/commons/numbers/core/Precision.java
@@ -486,21 +486,18 @@ public final class Precision {
}
/**
- * Computes a number {@code delta} close to {@code originalDelta} with
- * the property that <pre><code>
- * x + delta - x
- * </code></pre>
- * is exactly machine-representable.
- * This is useful when computing numerical derivatives, in order to reduce
- * roundoff errors.
+ * Computes a number close to {@code delta} with the property that
+ * {@code (x + delta - x)} is exactly machine-representable.
+ * This is useful when computing numerical derivatives, in order to
+ * reduce roundoff errors.
*
* @param x Value.
- * @param originalDelta Offset value.
- * @return a number {@code delta} so that {@code x + delta} and {@code x}
- * differ by a representable floating number.
+ * @param delta Offset value.
+ * @return the machine-representable floating number closest to the
+ * difference between {@code x + delta} and {@code x}.
*/
public static double representableDelta(double x,
- double originalDelta) {
- return x + originalDelta - x;
+ double delta) {
+ return x + delta - x;
}
}