Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1613

BigDecimal is created when you pass it the min or max values of Double

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.12.0
    • Component/s: lang.math.*
    • Labels:
      None

      Description

      I was doing tests and I have found that if you try to create a number using NumberUtils.createNumber and pass it the minimum possible value of a Double and concatenating "D" it returns a decimal

       

      assertTrue(NumberUtils.createNumber("4.9e-324D") instanceof Double); assertTrue(NumberUtils.createNumber("4.9e-324F") instanceof Double);
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              arturobernalg Arturo Bernal
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m