You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "charryong (JIRA)" <ji...@apache.org> on 2016/03/31 11:19:25 UTC

[jira] [Updated] (LANG-1215) NumberUtils.createNumber() method lost precision sometimes

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

charryong updated LANG-1215:
----------------------------
    Affects Version/s:     (was: 2.6)

> NumberUtils.createNumber() method lost precision sometimes
> ----------------------------------------------------------
>
>                 Key: LANG-1215
>                 URL: https://issues.apache.org/jira/browse/LANG-1215
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.math.*
>    Affects Versions: 3.4
>         Environment: Windows 7,Jdk1.6,Eclipse 3.5
>            Reporter: charryong
>            Priority: Critical
>              Labels: github-import
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> For example:
>     System.out.println(NumberUtils.createNumber("193343.82"));
> The result  is   193343.81。
> The bug because of  code in the class  NumberUtils of the org.apache.commons.lang3.math package。
>     public static Float createFloat(final String str) {
>         if (str == null) {
>             return null;
>         }
>         return Float.valueOf(str);
>     }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)