commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (MATH-618) Complex Add and Subtract handle NaN arguments differently, but javadoc contracts are the same
Date Thu, 14 Jul 2011 06:09:06 GMT

     [ 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 <code>rhs</code> 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

        

Mime
View raw message