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

Errors in FloatValidator

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Component/s: wtk
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: