Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-159

Modify our handling of BigDecimal division to use MathContext.DECIMAL128 as our rounding mode to improve scale and precision of results

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 7.0
    • 6.0.0
    • Server
    • None
    • Documentation (Ref Guide, User Guide, etc.), Release Notes, Compatibility/Configuration
    • Low

    Description

      Using MathContext.DECIMAL128 should give a more usable scale and precision to the results.

      Current behavior

      254403453878 / 21870000000 returns 12
      and
      254403453878.0001 / 21870000000 returns 11.6325

      Improved behavior:

      254403453878 / 21870000000 returns 11.632531
      and
      254403453878.0001 / 21870000000 returns 11.632531

      We should also investigate what the impact of this change will be on users who may be relying on our current behavior.

      Reference: This enhancement was suggested by Issue Tracker Issue 175485, contributed by Greg Haber

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ghelblin Jerry Helbling (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: