[SERVER-70359] Double -0 maps to negative-most value for Queryable Encryption Range Created: 07/Oct/22  Updated: 29/Oct/23  Resolved: 13/Oct/22

Status: Closed
Project: Core Server
Component/s: Queryable Encryption
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

This test case fails in TEST(RangeTest, Int64_Bounds)

ASSERT_EIB(-0.0, 9223372036854775808ULL); 

Participants:

 Description   

Summary

In getTypeInfoDouble:
-0 is being mapped to the uint64_t value 0.
+0 is being mapped to the uint64_t value 9223372036854775808ULL (2**63).
 
Expect "-0" and "+0" to map to the same value.



 Comments   
Comment by Githook User [ 13/Oct/22 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: SERVER-70359 handle negative zero for double
Branch: master
https://github.com/mongodb/mongo/commit/e5c50790bc197bf4676a50f0adae8a24449253e0

Generated at Thu Feb 08 06:15:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.