[ 
https://issues.apache.org/jira/browse/MATH-821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luc Maisonobe resolved MATH-821.
--------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 4.0)
                   3.3

Unit tests have been relaxed.

Comments have been added in the javadoc for SparseVector interface and 
OpenMapRealVector class.

> SparseRealVectorTest.testMap and testMapToSelf fail because zero entries lose 
> their sign
> ----------------------------------------------------------------------------------------
>
>                 Key: MATH-821
>                 URL: https://issues.apache.org/jira/browse/MATH-821
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>              Labels: linear, sparse
>             Fix For: 3.3
>
>
> Mapping {{Inverse}} to an {{OpenMapRealVector}} can lead to wrong answers, 
> because {{1.0 / 0.0}} should return {{+/-Infinity}} depending on the sign of 
> the zero entry. Since the sign is lost in {{OpenMapRealVector}}, the answer 
> must be wrong if the entry is truly {{-0.0}}.
> This is a difficult bug, because it potentially affects any function passed 
> to {{OpenMapRealVector.map()}} or {{mapToSelf()}}. I would recommend we relax 
> the requirements in the unit tests of this class, and make people aware of 
> the issue in the class documentation.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to