You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some applications require either huge numbers, or perfectly lossless decimal numbers (e.g. banking). 64-bit floating point doesn't work for these because it loses precision as numbers grow, and it can't represent negative powers of ten precisely.
The workaround in JSON is to store the number as a string containing an ASCII decimal representation. It would be useful to have a data type for this, so it could be recognized by all clients as a number. Accessing it as an int or double would be best-effort, accessing it as a string would return the exact string given.
The text was updated successfully, but these errors were encountered:
Some applications require either huge numbers, or perfectly lossless decimal numbers (e.g. banking). 64-bit floating point doesn't work for these because it loses precision as numbers grow, and it can't represent negative powers of ten precisely.
The workaround in JSON is to store the number as a string containing an ASCII decimal representation. It would be useful to have a data type for this, so it could be recognized by all clients as a number. Accessing it as an int or double would be best-effort, accessing it as a string would return the exact string given.
The text was updated successfully, but these errors were encountered: