Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Duplicate
-
2.6, 3.4
-
None
-
Windows 7,Jdk1.6,Eclipse 3.5
-
Important
Description
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 Float.valueOf(str);
}
Attachments
Issue Links
- duplicates
-
LANG-1018 NumberUtils.createNumber(final String str) Precision will be lost
- Closed