Feedback Raised

Takuro Okada, from Nomura Research Institute, Ltd. has raised the following remark:

Status

Methodology

N/A

Tech Specs

Proposed ADR-39 consistent typing of real numbers

Decision

Pending WG consensus

Rationale

In JSON any numeric value can either be an Integer or Number. Because there is no unambiguous definition of floating point precision for Number, we use an artificial Decimal type where the number is formatted as a string. This will prevent a software implementation to inadvertently loose precision when reading the numerical values into floating point data types.

The downside is of course that any implementation explicitly needs to convert these strings to internal decimal numbers to be able to do any calculation.

For a lot of real-life scenarios, using the ambiguous floating point Number type could be sufficient, but when numbers get extremely small or big one runs into precision errors.

Reference Materials