Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1122

DPath: round-half-to-even is always rounding up (not to even) when fractional part is half

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 1.0.0
    • s15
    • Back End
    • None

      Note: this bug exists in the dpath branch, not the current 0.15.0

      Instead of rounding to half when the fractional portion is even, fn:round-half-to-even now always rounds up
      e.g:
      [error] Test edu.illinois.ncsa.daffodil.section23.dfdl_expressions.TestDFDLExpressions.test_xPathFunc_round_hte_03 failed: java.lang.Exception:
      [error] Comparison failed.
      [error] Expected
      [error] <round-hte><num>3.00865</num><precision>4</precision><roundval>3.0086</roundval></round-hte>
      [error] Actual
      [error] <round-hte><num>3.00865</num><precision>4</precision><roundval>3.0087</roundval></round-hte>

      See tests:
      test_xPathFunc_round_hte_02
      test_xPathFunc_round_hte_03
      test_xPathFunc_round_hte_05

              jchab Jessie Chab
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1 hour, 47 minutes
                  1h 47m