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

Document BigDecimal/Decimal128 differences

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Unknown Unknown
    • bson-4.14.0
    • None
    • BSON
    • None
    • Fully Compatible

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: