[SERVER-677] make long wrapper in shell have a "floatApprox" field Created: 25/Feb/10  Updated: 12/Jul/16  Resolved: 01/Mar/10

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: None
Fix Version/s: 1.3.3

Type: Improvement Priority: Major - P3
Reporter: Eliot Horowitz (Inactive) Assignee: Aaron Staple
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

need a way to get a rough number quickly



 Comments   
Comment by auto [ 01/Mar/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-677 better double/long long conversion check
http://github.com/mongodb/mongo/commit/3112a2d0ec8335fea70bf4853c48ccd0b3e162c4

Comment by auto [ 01/Mar/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-677 number long floatApprox v8
http://github.com/mongodb/mongo/commit/ee47bb3c123e9dabf755857036b728a9dcf58561

Comment by auto [ 01/Mar/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-677 add floatApprox sm
http://github.com/mongodb/mongo/commit/89f3e6d65b0d0daa5e70a9dc97a60297ed167678

Comment by Eliot Horowitz (Inactive) [ 01/Mar/10 ]

no - leave top and bottom as is for now.
just add the floatApprox field

Comment by Aaron Staple [ 01/Mar/10 ]

I'm not a JS expert, but I think to get top and bottom to print in hex I would need to make them objects rather than numbers. It would be easier to just hide them from the user entirely. Would that be preferable?

Comment by Mathias Stearn [ 25/Feb/10 ]

Doubles are exact to 2*53 (more than 9 thousand trillion). Since that is high enough for most purposes, can we have it only split into high and low when the value is higher than that. Also for bit fields, I think it'd be preferable to print high and low in hex.

Comment by Eliot Horowitz (Inactive) [ 25/Feb/10 ]

we need a field for when you're looking at a bit object with many fields

Comment by Aaron Staple [ 25/Feb/10 ]

There is already a toNumber function and an implicit conversion. Are those adequate, or should there be a field as well?

Generated at Thu Feb 08 02:54:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.