Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
1.3.4
-
None
Description
Unlike 1.2.x, 1.3.4's shell displays
{ "floatApprox" } on every bson_long/bson_int field, even when the displayed value is exact. This makes the output larger and harder to read. Change such that { "floatApprox" }is only displayed when the double representation is actually inexact.
IRC:
<rphlx> what's up with the floatApprox stuff in the 1.3.x shell? i.e. 1.2.3 had "user_id" : 1; 1.3x has "user_id" :
. user_id is a bson_long..
<mdirolf> rphlx: JS has no real way of representing a long
<mdirolf> everything is a "Number" (double precision floating point) in JS
<rphlx> fine, but i am using ints less than 53 bits, that fit in a double mantissa. there's no approximation, they're exact ![]()
<mdirolf> rphlx: yeah when things fit in mantissa i would vote for just representing directly
<rphlx> eh, is there a way to turn off the "floatApprox" display? i don't need to be reminded of js limitations on every field ![]()
<mdirolf> rphlx: don't think so - but maybe open a case in jira to only use it when necessary like you suggest