From commits-return-71017-archive-asf-public=cust-asf.ponee.io@commons.apache.org Wed Dec 18 20:33:20 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 19B9C18065B for ; Wed, 18 Dec 2019 21:33:19 +0100 (CET) Received: (qmail 89825 invoked by uid 500); 18 Dec 2019 20:33:19 -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 89816 invoked by uid 99); 18 Dec 2019 20:33:19 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Dec 2019 20:33:19 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 972C38D80D; Wed, 18 Dec 2019 20:33:18 +0000 (UTC) Date: Wed, 18 Dec 2019 20:33:18 +0000 To: "commits@commons.apache.org" Subject: [commons-numbers] branch master updated: Use multiplyImaginary instead of multiply by Complex.I MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <157670119855.14698.534691689150809833@gitbox.apache.org> From: aherbert@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: commons-numbers X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 42a2f65b5b6543f548f951adc7c4b13e5f731a94 X-Git-Newrev: 9c0cb71537a8cc18af300902cd0155913370df07 X-Git-Rev: 9c0cb71537a8cc18af300902cd0155913370df07 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. aherbert 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 9c0cb71 Use multiplyImaginary instead of multiply by Complex.I 9c0cb71 is described below commit 9c0cb71537a8cc18af300902cd0155913370df07 Author: Alex Herbert AuthorDate: Wed Dec 18 20:33:13 2019 +0000 Use multiplyImaginary instead of multiply by Complex.I --- .../org/apache/commons/numbers/complex/CStandardTest.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/CStandardTest.java b/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/CStandardTest.java index 1a6deb3..f8f150d 100644 --- a/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/CStandardTest.java +++ b/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/CStandardTest.java @@ -51,7 +51,6 @@ public class CStandardTest { private static final Complex zeroPiTwo = complex(0.0, piOverTwo); private static final Complex negZeroZero = complex(-0.0, 0); private static final Complex negZeroNaN = complex(-0.0, nan); - private static final Complex negI = complex(0.0, -1.0); private static final Complex infZero = complex(inf, 0); private static final Complex infNaN = complex(inf, nan); private static final Complex infInf = complex(inf, inf); @@ -743,12 +742,12 @@ public class CStandardTest { final double re = next(rng); final double im = next(rng); final Complex z = complex(re, im); - final Complex iz = Complex.I.multiply(z); - assertComplex(z.asin(), negI.multiply(iz.asinh())); - assertComplex(z.atan(), negI.multiply(iz.atanh())); + final Complex iz = z.multiplyImaginary(1); + assertComplex(z.asin(), iz.asinh().multiplyImaginary(-1)); + assertComplex(z.atan(), iz.atanh().multiplyImaginary(-1)); assertComplex(z.cos(), iz.cosh()); - assertComplex(z.sin(), negI.multiply(iz.sinh())); - assertComplex(z.tan(), negI.multiply(iz.tanh())); + assertComplex(z.sin(), iz.sinh().multiplyImaginary(-1)); + assertComplex(z.tan(), iz.tanh().multiplyImaginary(-1)); } }