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

Change "too precise" float32 behavior

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.0.6
    • Affects Version/s: 0.0.5
    • Component/s: BSON
    • Labels:
      None

      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.

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

              Created:
              Updated:
              Resolved: