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 90EEB7325 for ; Mon, 18 Jul 2011 18:14:22 +0000 (UTC) Received: (qmail 9387 invoked by uid 500); 18 Jul 2011 18:14:22 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 8926 invoked by uid 500); 18 Jul 2011 18:14:21 -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 8902 invoked by uid 99); 18 Jul 2011 18:14:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jul 2011 18:14:20 +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; Mon, 18 Jul 2011 18:14: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 7C86B41568 for ; Mon, 18 Jul 2011 18:13:57 +0000 (UTC) Date: Mon, 18 Jul 2011 18:13:57 +0000 (UTC) From: "Gilles (JIRA)" To: issues@commons.apache.org Message-ID: <1694055733.992.1311012837506.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 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MATH-577?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D130671= 89#comment-13067189 ]=20 Gilles commented on MATH-577: ----------------------------- Maybe a combination of my version and yours... I don't like "shorthand" since it might let users wonder whether a temporar= y Complex variable is created. The "@see" tag is fine. I also wonder why the parameter is called "rhs". So: {code} /** * Computes the sum of this complex number and the given scalar number. *=20 * @param c Number to add. * @return {@code this + c}. * @see #add(Complex) */ public Complex add(double rhs) { if (isNaN || Double.isNaN(rhs)) { return NaN; } return createComplex(real + rhs, imaginary); } {code} > 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