You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/07/27 22:36:07 UTC

DO NOT REPLY [Bug 35904] New: - MathUtils round Method issues

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35904>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35904

           Summary: MathUtils  round Method issues
           Product: Commons
           Version: Nightly Builds
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Math
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: vemurys@hotmail.com


I was trying to use this class to round my float values.
class ==> org.apache.commons.math.util.MathUtils
method ==> round(float,scale)
Input 30.095 output 30.09 - ( i think should be  30.1)
Input 33.095 putput 33.1 - Correct
Input 50.085 output 50.08 - should have been 50.09
Input 50.185 output 50.19 - Correct
Input 50.005 output 50.01 - correct
Input 30.005 out put 30.0 - wrong
30.645 output - 30.65 - correct
So it seems there is some inconsistency. Not sure if its because of the how 
BigDecimal.ROUND_HALF_UP works. but still the data is inconsistent.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org