Return-Path:
X-Original-To: apmail-commons-issues-archive@minotaur.apache.org
Delivered-To: apmail-commons-issues-archive@minotaur.apache.org
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
by minotaur.apache.org (Postfix) with SMTP id BAB3B6742
for ;
Tue, 19 Jul 2011 08:16:47 +0000 (UTC)
Received: (qmail 31630 invoked by uid 500); 19 Jul 2011 08:16:46 -0000
Delivered-To: apmail-commons-issues-archive@commons.apache.org
Received: (qmail 29516 invoked by uid 500); 19 Jul 2011 08:16:25 -0000
Mailing-List: contact issues-help@commons.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: issues@commons.apache.org
Delivered-To: mailing list issues@commons.apache.org
Received: (qmail 29119 invoked by uid 99); 19 Jul 2011 08:16:21 -0000
Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136)
by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jul 2011 08:16:21 +0000
X-ASF-Spam-Status: No, hits=-2001.1 required=5.0
tests=ALL_TRUSTED,RP_MATCHES_RCVD
X-Spam-Check-By: apache.org
Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116)
by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jul 2011 08:16:18 +0000
Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116])
by hel.zones.apache.org (Postfix) with ESMTP id 432AB43870
for ; Tue, 19 Jul 2011 08:15:58 +0000 (UTC)
Date: Tue, 19 Jul 2011 08:15:58 +0000 (UTC)
From: =?utf-8?Q?Arne_Pl=C3=B6se_=28JIRA=29?=
To: issues@commons.apache.org
Message-ID:
<349780326.3197.1311063358271.JavaMail.tomcat@hel.zones.apache.org>
In-Reply-To:
<880300261.14789.1305531707356.JavaMail.tomcat@hel.zones.apache.org>
Subject: [jira] [Commented] (MATH-577) Enhance Complex.java
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394
[ https://issues.apache.org/jira/browse/MATH-577?page=3Dcom.atlassian.j=
ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D130675=
69#comment-13067569 ]=20
Arne Pl=C3=B6se commented on MATH-577:
---------------------------------
Fix for some typos:
{code}
/**
* Returns a {@code Complex} whose value is {@code (this +
* augend)}.
*
* Uses the definitional formula
*
* (a + bi) + (c + di) =3D (a+c) + (b+d)i
*
*
* If either this
or augend
has a NaN=
code> value in either part,
* {@link #NaN} is returned; otherwise Infinite
and =
NaN
values are
* returned in the parts of the result according to the rules for
* {@link java.lang.Double} arithmetic.
*
* @param augend value to be added to this {@code Complex}.
* @return {@code this + augend}
* @throws NullArgumentException if rhs
is null
*/
@Override
public Complex add(Complex augend)
throws NullArgumentException {
MathUtils.checkNotNull(augend);
if (isNaN || augend.isNaN) {
return NaN;
}
return createComplex(real + augend.getReal(),
imaginary + augend.getImaginary());
}
{code}
On can link Infinity and NaN to Double.*, but I think that is not necessary=
.=20
> Enhance Complex.java
> --------------------
>
> Key: MATH-577
> URL: https://issues.apache.org/jira/browse/MATH-577
> Project: Commons Math
> Issue Type: Improvement
> Affects Versions: 3.0
> Reporter: Arne Pl=C3=B6se
> Priority: Minor
> Attachments: Complex.diff, Complex.diff, Complex.diff
>
>
> Add some double shorthand methods to Complex fix different NaN checks in =
add and subtract ! Testcase testAddNaN will fail (what should be the resul=
t ?)
> What is missing JavaDoc and testcases.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira