Load result with the closest Decimal64 representation of this number.
Synopsis
Declared in <bdljsn_json.h>
int
asDecimal64Exact(bdldfp::Decimal64* result) const;
Description
Load the specified result with the closest floating point representation to the value of type JsonNumber held by this object, even if a non‐zero status is returned. Return 0 if this number can be represented exactly, and return JsonNumber::k_INEXACT if value cannot be represented exactly. If this number is outside the representable range, load result with +INF or ‐INF (as appropriate). A number can be represented exactly as a Decimal64 if, for the significand and exponent, abs(significand) <= 9,999,999,999,999,999 and ‐398 <= exponent <= 369. The behavior is undefined unless isNumber() returns true;
Return Value
JsonNumber::k_INEXACT if value cannot be represented exactly
Parameters
Name |
Description |
result |
destination for the converted value |
Created with MrDocs