Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-335

Errors in FloatValidator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3
    • 1.4
    • wtk
    • None

    Description

      FloatValidator is reporting the following values (among many others) as invalid, though they are clearly valid float values:

      0.52986217
      0.11

      I tried playing with changing FloatValidator to use the following code, but to no avail...

      > BigDecimal bigFloat = new BigDecimal(value, MathContext.DECIMAL32).stripTrailingZeros();
      > BigDecimal bigDouble = new BigDecimal(value, MathContext.DECIMAL64).stripTrailingZeros();
      > return (bigFloat.compareTo(bigDouble) == 0);

      Attachments

        Activity

          People

            grandinj Noel Grandin
            tvolkert Todd Volkert
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: