[JAVA-2515] Fix FloatCodec lower range Created: 15/May/17  Updated: 29/Oct/23  Resolved: 15/May/17

Status: Closed
Project: Java Driver
Component/s: Codecs
Affects Version/s: None
Fix Version/s: 3.5.0

Type: Bug Priority: Minor - P4
Reporter: Ross Lawley Assignee: Ross Lawley
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Float.MIN_VALUE is not the mathematical minimum it can represent. Negative of MAX_VALUE is the mathematical minimum value for floats.



 Comments   
Comment by Githook User [ 15/May/17 ]

Author:

{u'username': u'andyphillips404', u'name': u'Andy Phillips', u'email': u'andyphillips@fastmail.com'}

Message: Update to FloatCodec to support negative numbers (#400)

in Java, the most negative number for a float is -Float.MAX_VALUE, not Float.MIN_VALUE. The original code would not parse any negative numbers are smaller than Float.MIN_VALUE. Float.MIN_VALUE is the smallest positive number.

JAVA-2515
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/32c80cb86328b39678d3d9ede3d1da4f343906a1

Generated at Thu Feb 08 08:57:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.