commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-1089) Precision.round() returns different results when provided negative zero as double or float
Date Thu, 16 Jan 2014 21:55:19 GMT

    [ https://issues.apache.org/jira/browse/MATH-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13874004#comment-13874004
] 

Thomas Neidhart commented on MATH-1089:
---------------------------------------

This not only affects negative zero, but all negative values that would be rounded to 0.
In these cases the result should be negative zero to be consistent with the result of Precision.round(float,
x).

> Precision.round() returns different results when provided negative zero as double or
float
> ------------------------------------------------------------------------------------------
>
>                 Key: MATH-1089
>                 URL: https://issues.apache.org/jira/browse/MATH-1089
>             Project: Commons Math
>          Issue Type: Bug
>            Reporter: Thomas Neidhart
>
> Precision.round(-0.0d, x) = 0.0
> Precision.round(-0.0f, x) = -0.0
> After discussion on the mailinglist, the result should always be -0.0.



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

Mime
View raw message