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 DD09A7B0E for ; Thu, 14 Jul 2011 06:09:46 +0000 (UTC) Received: (qmail 76354 invoked by uid 500); 14 Jul 2011 06:09:44 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 76108 invoked by uid 500); 14 Jul 2011 06:09:31 -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 75279 invoked by uid 99); 14 Jul 2011 06:09:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jul 2011 06:09:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_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; Thu, 14 Jul 2011 06:09:27 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 4822D56F24 for ; Thu, 14 Jul 2011 06:09:06 +0000 (UTC) Date: Thu, 14 Jul 2011 06:09:06 +0000 (UTC) From: "Phil Steitz (JIRA)" To: issues@commons.apache.org Message-ID: <1395375376.12469.1310623746292.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <775038152.11107.1310588641587.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (MATH-618) Complex Add and Subtract handle NaN arguments differently, but javadoc contracts are the same MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MATH-618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phil Steitz resolved MATH-618. ------------------------------ Resolution: Fixed Fixed in r1146573 > Complex Add and Subtract handle NaN arguments differently, but javadoc contracts are the same > --------------------------------------------------------------------------------------------- > > Key: MATH-618 > URL: https://issues.apache.org/jira/browse/MATH-618 > Project: Commons Math > Issue Type: Bug > Affects Versions: 1.2, 2.0, 2.1, 2.2 > Reporter: Phil Steitz > Fix For: 3.0 > > > For both Complex add and subtract, the javadoc states that > {code} > * If either this or rhs has a NaN value in either part, > * {@link #NaN} is returned; otherwise Inifinite and NaN values are > * returned in the parts of the result according to the rules for > * {@link java.lang.Double} arithmetic > {code} > Subtract includes an isNaN test and returns Complex.NaN if either complex argument isNaN; but add omits this test. The test should be added to the add implementation (actually restored, since this looks like a code merge problem going back to 1.1). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira