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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.12.0
    • lang.math.*
    • 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

            Unassigned Unassigned
            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