Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2861

Document BigDecimal/Decimal128 differences

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • bson-4.14.0
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • Fully Compatible

      We know 2 currently:

      1. BigDecimal has unlimited range and precision. Decimal128 has finite range and precision. The documentation should specify what both of those are. This affects serialization from BigDecimal to Decimal128.
      2. Decimal128 supports signed NaNs, BigDecimal does not. This affects deserialization from Decimal128 to BigDecimal (signedness of NaNs is lost).
      3. Decimal128 keeps track of trailing zeroes, while BigDecimal does not.

      The documentation should be added under https://docs.mongodb.com/ruby-driver/master/tutorials/bson-v4/#bson-decimal128.

            Assignee:
            neil.shweky@mongodb.com Neil Shweky (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: