[SERVER-3714] nan doubles are matched as if they are equal to each other, but they are not considered equal outside our matching system Created: 29/Aug/11  Updated: 28/Jan/15  Resolved: 28/Jan/15

Status: Closed
Project: Core Server
Component/s: Index Maintenance, Querying
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Aaron Staple Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

> c.drop();
true
> c.save( {a:0/0} );
> c.findOne( {a:0/0} )
{ "_id" : ObjectId("4e5c0743d1f8b3987d09b7fd"), "a" : NaN }
> c.findOne( {a:0/0} ).a == 0/0
false
> c.findOne( {a:{$ne:0/0}} )
null



 Comments   
Comment by Aaron Staple [ 29/Aug/11 ]

If we change this we should be sure to think about how unique indexes are handled.

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