[ 
https://issues.apache.org/jira/browse/LANG-1444?focusedWorklogId=524896&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-524896
 ]

ASF GitHub Bot logged work on LANG-1444:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Dec/20 09:00
            Start Date: 16/Dec/20 09:00
    Worklog Time Spent: 10m 
      Work Description: coveralls commented on pull request #675:
URL: https://github.com/apache/commons-lang/pull/675#issuecomment-745948308


   
   [![Coverage 
Status](https://coveralls.io/builds/35755438/badge)](https://coveralls.io/builds/35755438)
   
   Coverage increased (+0.0003%) to 95.016% when pulling 
**8f0382441504cc4d0a01efc33b14d130918acfd1 on bndhanush:master** into 
**615eee5d51e14a00f0f7dd0ff7846cd4d7ae9a9e on apache:master**.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 524896)
    Time Spent: 40m  (was: 0.5h)

> NumberUtils.createNumber() does not create BigDecimal for decimal fractions 
> tending to zero
> -------------------------------------------------------------------------------------------
>
>                 Key: LANG-1444
>                 URL: https://issues.apache.org/jira/browse/LANG-1444
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.math.*
>    Affects Versions: 3.8.1
>            Reporter: Costa Theodosiou
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The following code demonstrates the issue:
> {{System.out.println(NumberUtils.createNumber("1.1").getClass().getName());}}
> {{System.out.println(NumberUtils.createNumber("1.001").getClass().getName());}}
> {{System.out.println(NumberUtils.createNumber("1.00001").getClass().getName());}}
> {{System.out.println(NumberUtils.createNumber("1.0000001").getClass().getName());}}
> {{System.out.println(NumberUtils.createNumber("1.000000001").getClass().getName());}}
> {{System.out.println(NumberUtils.createNumber("1.00000000001").getClass().getName());}}
> {{System.out.println(NumberUtils.createNumber("1.0000000000001").getClass().getName());}}
> {{System.out.println(NumberUtils.createNumber("1.000000000000001").getClass().getName());}}
> {{System.out.println(NumberUtils.createNumber("1.00000000000000001").getClass().getName());}}
> {{System.out.println(NumberUtils.createNumber("1.0000000000000000001").getClass().getName());}}
> {{System.out.println(NumberUtils.createNumber("1.000000000000000000001").getClass().getName());}}
> {{System.out.println(NumberUtils.createNumber("1.00000000000000000000001").getClass().getName());}}
> will print:
> {{java.lang.Float}}
> {{java.lang.Float}}
> {{java.lang.Float}}
> {{java.lang.Float}}
> {{java.lang.Double}}
> {{java.lang.Double}}
> {{java.lang.Double}}
> {{java.lang.Double}}
> {{java.lang.Float}}
> {{java.lang.Float}}
> {{java.lang.Float}}
> {{java.lang.Float}}
> It seems the problem is towards the bottom of the createNumber method that 
> compares the float to double string representation:
> f.toString().equals(d.toString())
> For the misbehaving tests, the string "1.0".equals("1.0")



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to