You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2022/07/28 10:02:44 UTC

[commons-numbers] branch complex-gsoc-2022 updated (9510b535 -> 91ac6cf3)

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

aherbert pushed a change to branch complex-gsoc-2022
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git


    from 9510b535 NUMBERS-188: Refactor complex scalar binary functions to static methods
     new 1042c988 Reorder help functions to match the order from Complex
     new 93ce2777 Javadoc updates
     new 1b1e63ba Remove documented references to Complex in ComplexFunctions
     new 91ac6cf3 Javadoc: Consistent use of (a + ib)

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../numbers/complex/ComplexBinaryOperator.java     |   8 +-
 .../commons/numbers/complex/ComplexFunctions.java  | 221 ++++++++++-----------
 .../numbers/complex/ComplexScalarFunction.java     |  13 +-
 .../commons/numbers/complex/ComplexSink.java       |   4 +-
 .../numbers/complex/ComplexUnaryOperator.java      |   4 +-
 .../commons/numbers/complex/ComplexNumber.java     |   4 +-
 .../apache/commons/numbers/complex/TestUtils.java  |  32 +--
 7 files changed, 143 insertions(+), 143 deletions(-)


[commons-numbers] 01/04: Reorder help functions to match the order from Complex

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch complex-gsoc-2022
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit 1042c9885e577b0872fe46a20234032ec6d631f0
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Jul 28 10:34:25 2022 +0100

    Reorder help functions to match the order from Complex
---
 .../org/apache/commons/numbers/complex/TestUtils.java    | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/TestUtils.java b/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/TestUtils.java
index cefe109b..ad50560e 100644
--- a/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/TestUtils.java
+++ b/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/TestUtils.java
@@ -524,9 +524,9 @@ public final class TestUtils {
     }
 
     /**
-     * Computes the result of the subtraction of a complex number from an imaginary number.
+     * Computes the result of the subtraction of a complex number from a real number.
      * Implements the formula:
-     * \[ i d - (a + i b) = -a + i (d - b) \]
+     * \[ c - (a + i b) = (c - a) - i b \]
      *
      * <p>This method is a helper to replicate the method signature of the object-orientated
      * API in Complex (i.e. the complex argument is first) using the equivalent static API
@@ -539,15 +539,15 @@ public final class TestUtils {
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
      */
-    public static <R> R subtractFromImaginary(double real, double imaginary, double minuend, ComplexSink<R> action) {
+    public static <R> R subtractFrom(double real, double imaginary, double minuend, ComplexSink<R> action) {
         // Call the equivalent static API function
-        return ComplexFunctions.imaginarySubtract(minuend, real, imaginary, action);
+        return ComplexFunctions.realSubtract(minuend, real, imaginary, action);
     }
 
     /**
-     * Computes the result of the subtraction of a complex number from a real number.
+     * Computes the result of the subtraction of a complex number from an imaginary number.
      * Implements the formula:
-     * \[ c - (a + i b) = (c - a) - i b \]
+     * \[ i d - (a + i b) = -a + i (d - b) \]
      *
      * <p>This method is a helper to replicate the method signature of the object-orientated
      * API in Complex (i.e. the complex argument is first) using the equivalent static API
@@ -560,8 +560,8 @@ public final class TestUtils {
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
      */
-    public static <R> R subtractFrom(double real, double imaginary, double minuend, ComplexSink<R> action) {
+    public static <R> R subtractFromImaginary(double real, double imaginary, double minuend, ComplexSink<R> action) {
         // Call the equivalent static API function
-        return ComplexFunctions.realSubtract(minuend, real, imaginary, action);
+        return ComplexFunctions.imaginarySubtract(minuend, real, imaginary, action);
     }
 }


[commons-numbers] 02/04: Javadoc updates

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch complex-gsoc-2022
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit 93ce2777c6f7f2b500d98a8c2d156993a9dd77d1
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Jul 28 10:41:54 2022 +0100

    Javadoc updates
    
    Add references to TestUtils helper methods.
    
    Finish end of sentence in functional interface javadoc.
    
    Correct divideImaginary code example.
---
 .../org/apache/commons/numbers/complex/ComplexFunctions.java     | 2 +-
 .../apache/commons/numbers/complex/ComplexScalarFunction.java    | 9 +++++----
 .../test/java/org/apache/commons/numbers/complex/TestUtils.java  | 8 ++++++--
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexFunctions.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexFunctions.java
index 1917aa1b..938ab9eb 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexFunctions.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexFunctions.java
@@ -909,7 +909,7 @@ public final class ComplexFunctions {
      * In this case the divide method using a zero-valued Complex will produce the same result
      * as dividing by a real-only zero. The output from dividing by imaginary zero will create
      * infinite and NaN values in the same component parts as the output from
-     * {@code divide(real, imaginary, Complex.ZERO, action).multiplyImaginary(real, imaginary, 1, action)}, however the sign
+     * {@code divide(real, imaginary,  0, 0, (x, y) -> multiplyImaginary(x, y, 1, action))}, however the sign
      * of some infinite values may be negated.
      *
      * @param real Real part \( a \) of the complex number \( (a +ib) \).
diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexScalarFunction.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexScalarFunction.java
index b339f5a3..40d2ac18 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexScalarFunction.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexScalarFunction.java
@@ -18,10 +18,11 @@
 package org.apache.commons.numbers.complex;
 
 /**
- * Represents a binary operation on a Cartesian form of a complex number \( a + ib \)
- * and a {@code double} scalar operand, where \( a \) and \( b \) are real numbers represented as two {@code double}
- * The operation creates a complex number result; the result is supplied to a terminating consumer function
- * which may return an object representation of the complex result.
+ * Represents a binary operation on a Cartesian form of a complex number \( a + ib \) and
+ * a {@code double} scalar operand, where \( a \) and \( b \) are real numbers represented
+ * as two {@code double} parts. The operation creates a complex number result; the result
+ * is supplied to a terminating consumer function which may return an object
+ * representation of the complex result.
  *
  * <p>This is a functional interface whose functional method is
  * {@link #apply(double, double, double, ComplexSink)}.
diff --git a/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/TestUtils.java b/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/TestUtils.java
index ad50560e..be6ab717 100644
--- a/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/TestUtils.java
+++ b/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/TestUtils.java
@@ -534,10 +534,12 @@ public final class TestUtils {
      *
      * @param real Real part \( a \) of the complex number \( (a +ib) \).
      * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
-     * @param minuend Value the complex number is to be subtracted from.
+     * @param minuend Real value the complex number is to be subtracted from.
      * @param action Consumer for the subtraction result.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
+     * @see Complex#subtractFrom(double)
+     * @see ComplexFunctions#realSubtract(double, double, double, ComplexSink)
      */
     public static <R> R subtractFrom(double real, double imaginary, double minuend, ComplexSink<R> action) {
         // Call the equivalent static API function
@@ -555,10 +557,12 @@ public final class TestUtils {
      *
      * @param real Real part \( a \) of the complex number \( (a +ib) \).
      * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
-     * @param minuend Value the complex number is to be subtracted from.
+     * @param minuend Imaginary value the complex number is to be subtracted from.
      * @param action Consumer for the subtraction result.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
+     * @see Complex#subtractFromImaginary(double)
+     * @see ComplexFunctions#imaginarySubtract(double, double, double, ComplexSink)
      */
     public static <R> R subtractFromImaginary(double real, double imaginary, double minuend, ComplexSink<R> action) {
         // Call the equivalent static API function


[commons-numbers] 03/04: Remove documented references to Complex in ComplexFunctions

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch complex-gsoc-2022
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit 1b1e63ba6854f351966e522bd4a0061f0e00fa77
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Jul 28 10:49:48 2022 +0100

    Remove documented references to Complex in ComplexFunctions
---
 .../commons/numbers/complex/ComplexFunctions.java       | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexFunctions.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexFunctions.java
index 938ab9eb..380373e2 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexFunctions.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexFunctions.java
@@ -289,19 +289,13 @@ public final class ComplexFunctions {
      * Returns {@code true} if either the real <em>or</em> imaginary component of the complex number is NaN
      * <em>and</em> the complex number is not infinite.
      *
-     * <p>Note that:
-     * <ul>
-     *   <li>There is more than one complex number that can return {@code true}.
-     *   <li>Different representations of NaN can be distinguished by the
-     *       {@link #equals(Object) Complex.equals(Object)} method.
-     * </ul>
+     * <p>Note that there is more than one complex number that can return {@code true}.
      *
      * @param real Real part \( a \) of the complex number \( (a +ib) \).
      * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
      * @return {@code true} if the complex number contains NaN and no infinite parts.
      * @see Double#isNaN(double)
      * @see #isInfinite(double, double)
-     * @see #equals(Object) Complex.equals(Object)
      */
     public static boolean isNaN(double real, double imaginary) {
         if (Double.isNaN(real) || Double.isNaN(imaginary)) {
@@ -751,7 +745,8 @@ public final class ComplexFunctions {
      *
      * <p>This method can be used to compute the multiplication of the complex number \( z \)
      * by \( i \) using a factor with magnitude 1.0. This should be used in preference to
-     * {@link #multiply(double, double, double, double, ComplexSink) multiply(Complex.I)} with or without {@link #negate(double, double, ComplexSink) negation}:</p>
+     * {@link #multiply(double, double, double, double, ComplexSink) multiply(real, imaginary, 0, 1, action)}
+     * with or without {@link #negate(double, double, ComplexSink) negation}:</p>
      *
      * \[ \begin{aligned}
      *    iz &amp;= (-b + i a) \\
@@ -838,7 +833,7 @@ public final class ComplexFunctions {
                 (!Double.isNaN(a) || !Double.isNaN(b))) {
                 // nonzero/zero
                 // This case produces the same result as divide by a real-only zero
-                // using Complex.divide(+/-0.0)
+                // using divide(a, b, +/-0.0, action)
                 x = Math.copySign(Double.POSITIVE_INFINITY, c) * a;
                 y = Math.copySign(Double.POSITIVE_INFINITY, c) * b;
             } else if ((Double.isInfinite(a) || Double.isInfinite(b)) &&
@@ -1162,7 +1157,7 @@ public final class ComplexFunctions {
         // This alters the implementation of Hull et al (1994) which used a standard
         // precision representation of |z|: sqrt(x*x + y*y).
         // This formula should use the same definition of the magnitude returned
-        // by Complex.abs() which is a high precision computation with scaling.
+        // by abs(x, y) which is a high precision computation with scaling.
         // The checks for overflow thus only require ensuring the output of |z|
         // will not overflow or underflow.
 
@@ -1358,7 +1353,7 @@ public final class ComplexFunctions {
         // This alters the implementation of Hull et al (1994) which used a standard
         // precision representation of |z|: sqrt(x*x + y*y).
         // This formula should use the same definition of the magnitude returned
-        // by Complex.abs() which is a high precision computation with scaling.
+        // by abs(x, y) which is a high precision computation with scaling.
         // Worry about overflow if 2 * (|z| + |x|) will overflow.
         // Worry about underflow if |z| or |x| are sub-normal components.
 


[commons-numbers] 04/04: Javadoc: Consistent use of (a + ib)

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch complex-gsoc-2022
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit 91ac6cf31af49f15468fe46f08fae02015f81ca3
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Jul 28 10:52:35 2022 +0100

    Javadoc: Consistent use of (a + ib)
    
    Removes the use of (a +ib)
---
 .../numbers/complex/ComplexBinaryOperator.java     |   8 +-
 .../commons/numbers/complex/ComplexFunctions.java  | 202 ++++++++++-----------
 .../numbers/complex/ComplexScalarFunction.java     |   4 +-
 .../commons/numbers/complex/ComplexSink.java       |   4 +-
 .../numbers/complex/ComplexUnaryOperator.java      |   4 +-
 .../commons/numbers/complex/ComplexNumber.java     |   4 +-
 .../apache/commons/numbers/complex/TestUtils.java  |   8 +-
 7 files changed, 117 insertions(+), 117 deletions(-)

diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexBinaryOperator.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexBinaryOperator.java
index d30ee297..b21a2cd3 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexBinaryOperator.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexBinaryOperator.java
@@ -36,10 +36,10 @@ public interface ComplexBinaryOperator<R> {
     /**
      * Represents an operator that accepts real and imaginary parts of two complex numbers and supplies the complex result to the provided consumer.
      *
-     * @param real1 Real part \( a \) of the first complex number \( (a +ib) \).
-     * @param imaginary1 Imaginary part \( b \) of the first complex number \( (a +ib) \).
-     * @param real2 Real part \( c \) of the second complex number \( (c +id) \).
-     * @param imaginary2 Imaginary part \( d \) of the second complex number \( (c +id) \).
+     * @param real1 Real part \( a \) of the first complex number \( (a + ib) \).
+     * @param imaginary1 Imaginary part \( b \) of the first complex number \( (a + ib) \).
+     * @param real2 Real part \( c \) of the second complex number \( (c + id) \).
+     * @param imaginary2 Imaginary part \( d \) of the second complex number \( (c + id) \).
      * @param action Consumer for the complex result.
      * @return the object returned by the provided consumer.
      */
diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexFunctions.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexFunctions.java
index 380373e2..6e13b13a 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexFunctions.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexFunctions.java
@@ -211,8 +211,8 @@ public final class ComplexFunctions {
      *
      * <p>The computed result will be within 1 ulp of the exact result.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @return The absolute value.
      * @see #isInfinite(double, double)
      * @see #isNaN(double, double)
@@ -244,8 +244,8 @@ public final class ComplexFunctions {
      * in calculating the returned value using the {@code atan2(y, x)} method for complex
      * \( x + iy \).
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \). part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \). part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @return The argument of the complex number.
      * @see Math#atan2(double, double)
      */
@@ -270,8 +270,8 @@ public final class ComplexFunctions {
      * magnitude. If used for ranking any overflow to infinity will create an equal ranking for
      * values that may be still distinguished by {@code abs()}.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @return The square norm value.
      * @see #isInfinite(double, double)
      * @see #isNaN(double, double)
@@ -291,8 +291,8 @@ public final class ComplexFunctions {
      *
      * <p>Note that there is more than one complex number that can return {@code true}.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @return {@code true} if the complex number contains NaN and no infinite parts.
      * @see Double#isNaN(double)
      * @see #isInfinite(double, double)
@@ -309,8 +309,8 @@ public final class ComplexFunctions {
      *
      * <p>Note: A complex number with at least one infinite part is regarded
      * as an infinity (even if its other part is a NaN).
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @return {@code true} if the complex number contains an infinite value.
      * @see Double#isInfinite(double)
      */
@@ -321,8 +321,8 @@ public final class ComplexFunctions {
     /**
      * Returns {@code true} if both real and imaginary component of the complex number are finite.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @return {@code true} if the complex number instance contains finite values.
      * @see Double#isFinite(double)
      */
@@ -339,8 +339,8 @@ public final class ComplexFunctions {
      *                z  &amp;= a + i b \\
      *      \overline{z} &amp;= a - i b \end{aligned}\]
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the conjugate of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -356,8 +356,8 @@ public final class ComplexFunctions {
      *       z  &amp;=  a + i b \\
      *      -z  &amp;= -a - i b \end{aligned} \]
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the negation of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -376,8 +376,8 @@ public final class ComplexFunctions {
      *
      * <pre>(Double.POSITIVE_INFINITY, Math.copySign(0.0, imaginary))</pre>
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the projection of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -398,10 +398,10 @@ public final class ComplexFunctions {
      *
      * <p>\[ (a + i b) + (c + i d) = (a + c) + i (b + d) \]
      *
-     * @param real1 Real part \( a \) of the first complex number \( (a +ib) \).
-     * @param imaginary1 Imaginary part \( b \) of the first complex number \( (a +ib) \).
-     * @param real2 Real part \( c \) of the second complex number \( (c +id) \).
-     * @param imaginary2 Imaginary part \( d \) of the second complex number \( (a +id) \).
+     * @param real1 Real part \( a \) of the first complex number \( (a + ib) \).
+     * @param imaginary1 Imaginary part \( b \) of the first complex number \( (a + ib) \).
+     * @param real2 Real part \( c \) of the second complex number \( (c + id) \).
+     * @param imaginary2 Imaginary part \( d \) of the second complex number \( (a + id) \).
      * @param action Consumer for the addition result.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -428,8 +428,8 @@ public final class ComplexFunctions {
      * {@link #add(double, double, double, double, ComplexSink) add(real, imaginary, addend, 0, action)} since
      * {@code -0.0 + 0.0 = 0.0}.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param addend Value to be added to the complex number.
      * @param action Consumer for the addition result.
      * @param <R> the return type of the supplied action.
@@ -454,8 +454,8 @@ public final class ComplexFunctions {
      * {@link #add(double, double, double, double, ComplexSink) add(real, imaginary, 0, addend, action)} since
      * {@code -0.0 + 0.0 = 0.0}.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param addend Value to be added to the complex number.
      * @param action Consumer for the addition result.
      * @param <R> the return type of the supplied action.
@@ -472,10 +472,10 @@ public final class ComplexFunctions {
      *
      * <p>\[ (a + i b) - (c + i d) = (a - c) + i (b - d) \]
      *
-     * @param real1 Real part \( a \) of the first complex number \( (a +ib) \).
-     * @param imaginary1 Imaginary part \( b \) of the first complex number \( (a +ib) \).
-     * @param real2 Real part \( c \) of the second complex number \( (c +id) \).
-     * @param imaginary2 Imaginary part \( d \) of the second complex number \( (c +id) \).
+     * @param real1 Real part \( a \) of the first complex number \( (a + ib) \).
+     * @param imaginary1 Imaginary part \( b \) of the first complex number \( (a + ib) \).
+     * @param real2 Real part \( c \) of the second complex number \( (c + id) \).
+     * @param imaginary2 Imaginary part \( d \) of the second complex number \( (c + id) \).
      * @param action Consumer for the subtraction result.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -498,8 +498,8 @@ public final class ComplexFunctions {
      * <p>This method is included for compatibility with ISO C99 which defines arithmetic between
      * real-only and complex numbers.</p>
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param subtrahend Value to be subtracted from the complex number.
      * @param action Consumer for the subtraction result.
      * @param <R> the return type of the supplied action.
@@ -519,8 +519,8 @@ public final class ComplexFunctions {
      * <p>This method is included for compatibility with ISO C99 which defines arithmetic between
      * imaginary-only and complex numbers.</p>
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param subtrahend Value to be subtracted from the complex number.
      * @param action Consumer for the subtraction result.
      * @param <R> the return type of the supplied action.
@@ -545,8 +545,8 @@ public final class ComplexFunctions {
      * {@code 0.0 - 0.0 = 0.0}.
      *
      * @param minuend Value the complex number is to be subtracted from.
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the subtraction result.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -570,8 +570,8 @@ public final class ComplexFunctions {
      * {@code 0.0 - 0.0 = 0.0}.
      *
      * @param minuend Value the complex number is to be subtracted from.
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the subtraction result.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -589,10 +589,10 @@ public final class ComplexFunctions {
      *
      * <p>Recalculates to recover infinities as specified in C99 standard G.5.1.
      *
-     * @param real1 Real part \( a \) of the first complex number \( (a +ib) \).
-     * @param imaginary1 Imaginary part \( b \) of the first complex number \( (a +ib) \).
-     * @param real2 Real part \( a \) of the second complex number \( (a +ib) \).
-     * @param imaginary2 Imaginary part \( d \) of the second complex number \( (c +id) \).
+     * @param real1 Real part \( a \) of the first complex number \( (a + ib) \).
+     * @param imaginary1 Imaginary part \( b \) of the first complex number \( (a + ib) \).
+     * @param real2 Real part \( a \) of the second complex number \( (a + ib) \).
+     * @param imaginary2 Imaginary part \( d \) of the second complex number \( (c + id) \).
      * @param action Consumer for the multiplication result.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -725,8 +725,8 @@ public final class ComplexFunctions {
      * in {@link #multiply(double, double, double, double, ComplexSink)} may create zeros in the result that differ in sign
      * from the equivalent call to multiply by a real-only number.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param factor Value to be multiplied by the complex number.
      * @param action Consumer for the multiplication result.
      * @param <R> the return type of the supplied action.
@@ -762,8 +762,8 @@ public final class ComplexFunctions {
      * in {@link #multiply(double, double, double, double, ComplexSink)} may create zeros in the result that differ in sign
      * from the equivalent call to multiply by an imaginary-only number.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param factor Value to be multiplied by the complex number.
      * @param action Consumer for the multiplication result.
      * @param <R> the return type of the supplied action.
@@ -785,10 +785,10 @@ public final class ComplexFunctions {
      * <p>Note: In the event of divide by zero this method produces the same result
      * as dividing by a real-only zero using {@link #divide(double, double, double, ComplexSink)}.
      *
-     * @param real1 Real part \( a \) of the first complex number \( (a +ib) \).
-     * @param imaginary1 Imaginary part \( b \) of the first complex number \( (a +ib) \).
-     * @param real2 Real part \( c \) of the second complex number \( (c +id) \).
-     * @param imaginary2 Imaginary part \( d \) of the second complex number \( (c +id) \).
+     * @param real1 Real part \( a \) of the first complex number \( (a + ib) \).
+     * @param imaginary1 Imaginary part \( b \) of the first complex number \( (a + ib) \).
+     * @param real2 Real part \( c \) of the second complex number \( (c + id) \).
+     * @param imaginary2 Imaginary part \( d \) of the second complex number \( (c + id) \).
      * @param action Consumer for the division result.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -871,8 +871,8 @@ public final class ComplexFunctions {
      * in {@link #divide(double, double, double, double, ComplexSink)} may create zeros in the result that differ in sign
      * from the equivalent call to divide by a real-only number.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param divisor Value by which the complex number is to be divided.
      * @param action Consumer for the division result.
      * @param <R> the return type of the supplied action.
@@ -907,8 +907,8 @@ public final class ComplexFunctions {
      * {@code divide(real, imaginary,  0, 0, (x, y) -> multiplyImaginary(x, y, 1, action))}, however the sign
      * of some infinite values may be negated.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param divisor Value by which the complex number is to be divided.
      * @param action Consumer for the division result.
      * @param <R> the return type of the supplied action.
@@ -952,8 +952,8 @@ public final class ComplexFunctions {
      *
      * <p>\[ \exp(x + iy) = e^x (\cos(y) + i \sin(y)) \]
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \). part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \). part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the exponential of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -1055,8 +1055,8 @@ public final class ComplexFunctions {
      * ACM Transactions on Mathematical Software, Vol 20, No 2, pp 215-244.
      * </blockquote>
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib \).
      * @param action Consumer for the natural logarithm of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -1083,8 +1083,8 @@ public final class ComplexFunctions {
      *
      * <p>where \( |z| \) is the absolute and \( \arg(z) \) is the argument.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib \).
      * @param action Consumer for the base 10 common logarithm of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -1109,8 +1109,8 @@ public final class ComplexFunctions {
      * @param log Log function.
      * @param logOfeOver2 The log function applied to e, then divided by 2.
      * @param logOf2 The log function applied to 2.
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib \).
      * @param action Consumer for the natural logarithm of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -1212,10 +1212,10 @@ public final class ComplexFunctions {
      * in the real component and zero in the imaginary component;
      * otherwise it returns NaN + iNaN.
      *
-     * @param real1 Real part \( a \) of the first complex number \( (a +ib) \).
-     * @param imaginary1 Imaginary part \( b \) of the first complex number \( (a +ib) \).
-     * @param real2 Real part \( c \) of the second complex number \( (c +id) \).
-     * @param imaginary2 Imaginary part \( d \) of the second complex number \( (c +id) \).
+     * @param real1 Real part \( a \) of the first complex number \( (a + ib) \).
+     * @param imaginary1 Imaginary part \( b \) of the first complex number \( (a + ib) \).
+     * @param real2 Real part \( c \) of the second complex number \( (c + id) \).
+     * @param imaginary2 Imaginary part \( d \) of the second complex number \( (c + id) \).
      * @param action Consumer for the power result.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -1250,8 +1250,8 @@ public final class ComplexFunctions {
      * <p>If the complex number is zero then this method returns zero if {@code x} is positive;
      * otherwise it returns NaN + iNaN.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param x The exponent to which the complex number is to be raised.
      * @param action Consumer for the power result.
      * @param <R> the return type of the supplied action.
@@ -1320,8 +1320,8 @@ public final class ComplexFunctions {
      * ACM Transactions on Mathematical Software, Vol 20, No 2, pp 215-244.
      * </blockquote>
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib \).
      * @param action Consumer for the square root of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -1438,8 +1438,8 @@ public final class ComplexFunctions {
      *
      * <p>\[ \sin(z) = -i \sinh(iz) \]
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib \).
      * @param action Consumer for the sine of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -1470,8 +1470,8 @@ public final class ComplexFunctions {
      *
      * <p>\[ cos(z) = cosh(iz) \]
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib \).
      * @param action Consumer for the cosine of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -1500,8 +1500,8 @@ public final class ComplexFunctions {
      * <p>As per the C99 standard this function is computed using the trigonomic identity:</p>
      * \[ \tan(z) = -i \tanh(iz) \]
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib \).
      * @param action Consumer for the tangent of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -1549,8 +1549,8 @@ public final class ComplexFunctions {
      * <p>The code has been adapted from the <a href="https://www.boost.org/">Boost</a>
      * {@code c++} implementation {@code <boost/math/complex/asin.hpp>}.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the inverse sine of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -1573,8 +1573,8 @@ public final class ComplexFunctions {
      * file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
      * </pre>
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the inverse sine of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -1744,8 +1744,8 @@ public final class ComplexFunctions {
      * <p>The code has been adapted from the <a href="https://www.boost.org/">Boost</a>
      * {@code c++} implementation {@code <boost/math/complex/acos.hpp>}.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the inverse cosine of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -1768,8 +1768,8 @@ public final class ComplexFunctions {
      * file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
      * </pre>
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the inverse cosine of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -1905,8 +1905,8 @@ public final class ComplexFunctions {
      * <p>As per the C99 standard this function is computed using the trigonomic identity:
      * \[ \tan^{-1}(z) = -i \tanh^{-1}(iz) \]
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the inverse tangent of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -1951,8 +1951,8 @@ public final class ComplexFunctions {
      *
      * <p>\[ \sinh(x + iy) = \sinh(x)\cos(y) + i \cosh(x)\sin(y) \]
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the hyperbolic sine of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action..
@@ -2022,8 +2022,8 @@ public final class ComplexFunctions {
      *
      * <p>\[ \cosh(x + iy) = \cosh(x)\cos(y) + i \sinh(x)\sin(y) \]
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the hyperbolic tangent of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -2169,8 +2169,8 @@ public final class ComplexFunctions {
      * <p>The implementation uses double-angle identities to avoid overflow of {@code 2x}
      * and {@code 2y}.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the hyperbolic tangent of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -2305,7 +2305,7 @@ public final class ComplexFunctions {
      * <p>\[ \sinh^{-1}(z) = -i \sin^{-1}(iz) \]
      *
      * @param real part of Complex number
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib \).
      * @param action Consumer for the inverse hyperbolic sine of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -2361,8 +2361,8 @@ public final class ComplexFunctions {
      * <p>The sign of the multiplier is chosen to give {@code z.acosh().real() >= 0}
      * and compatibility with the C99 standard.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the inverse hyperbolic cosine of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -2430,8 +2430,8 @@ public final class ComplexFunctions {
      * <p>The code has been adapted from the <a href="https://www.boost.org/">Boost</a>
      * {@code c++} implementation {@code <boost/math/complex/atanh.hpp>}.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the inverse hyperbolic tangent of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -2455,8 +2455,8 @@ public final class ComplexFunctions {
      * file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
      * </pre>
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the inverse hyperbolic tangent of the complex number.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
@@ -3119,8 +3119,8 @@ public final class ComplexFunctions {
      * <pre>
      *  z = new Complex(real, imaginary).multiplyImaginary(-1);</pre>
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the complex number multiplied by {@code -i}.
      * @param <R> the return type of the supplied action.
      * @return the object returned by the supplied action.
diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexScalarFunction.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexScalarFunction.java
index 40d2ac18..48f73697 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexScalarFunction.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexScalarFunction.java
@@ -38,8 +38,8 @@ public interface ComplexScalarFunction<R> {
      * and a double operand to produce a Complex result.
      * The complex result is supplied to the provided consumer.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param operand Scalar operand.
      * @param action Consumer for the complex result.
      * @return the object returned by the provided consumer.
diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexSink.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexSink.java
index 1c78d188..0bfca066 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexSink.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexSink.java
@@ -32,8 +32,8 @@ public interface ComplexSink<R> {
 
     /**
      * Represents a function that accepts real and imaginary part of complex number and returns an object.
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @return R the object encapsulating the complex result
      */
     R apply(double real, double imaginary);
diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexUnaryOperator.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexUnaryOperator.java
index dbfc53d6..156088c2 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexUnaryOperator.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/ComplexUnaryOperator.java
@@ -36,8 +36,8 @@ public interface ComplexUnaryOperator<R> {
     /**
      * Represents an operator that accepts real and imaginary parts of a complex number and supplies the complex result to the provided consumer.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param action Consumer for the complex result.
      * @return the object returned by the provided consumer.
      */
diff --git a/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/ComplexNumber.java b/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/ComplexNumber.java
index 42ba9268..0880be34 100644
--- a/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/ComplexNumber.java
+++ b/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/ComplexNumber.java
@@ -34,8 +34,8 @@ class ComplexNumber {
     /**
      * Constructor representing a complex number by its real and imaginary parts.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib \).
+     * @param real Real part \( a \) of the complex number \( (a + ib \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib \).
      */
     ComplexNumber(double real, double imaginary) {
         this.real = real;
diff --git a/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/TestUtils.java b/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/TestUtils.java
index be6ab717..ef0fc931 100644
--- a/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/TestUtils.java
+++ b/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/TestUtils.java
@@ -532,8 +532,8 @@ public final class TestUtils {
      * API in Complex (i.e. the complex argument is first) using the equivalent static API
      * function in ComplexFunctions.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param minuend Real value the complex number is to be subtracted from.
      * @param action Consumer for the subtraction result.
      * @param <R> the return type of the supplied action.
@@ -555,8 +555,8 @@ public final class TestUtils {
      * API in Complex (i.e. the complex argument is first) using the equivalent static API
      * function in ComplexFunctions.
      *
-     * @param real Real part \( a \) of the complex number \( (a +ib) \).
-     * @param imaginary Imaginary part \( b \) of the complex number \( (a +ib) \).
+     * @param real Real part \( a \) of the complex number \( (a + ib) \).
+     * @param imaginary Imaginary part \( b \) of the complex number \( (a + ib) \).
      * @param minuend Imaginary value the complex number is to be subtracted from.
      * @param action Consumer for the subtraction result.
      * @param <R> the return type of the supplied action.