Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-426

Change "too precise" float32 behavior

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 0.0.6
    • 0.0.5
    • BSON
    • None

    Description

      I understand this is not a bug as much as a feature, but I think it's the wrong behavior:

      Right now if trying to deserialize a float to a float32, the decoder will return 0 if the float is too precise for 32 bits, without giving an error. I think the ideal solution would be to return an error, but that would require major changes. If we have to fail silently, the imprecise number seems better than 0.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: