Load the specified result with the specified value.
Synopsis
Declared in <bdljsn_numberutil.h>
static
int
asDecimal64Exact(
bdldfp::Decimal64* result,
std::string_view const& value);
Description
Load result even if a non‐zero status is returned. Return 0 if value can be represented exactly, and return k_INEXACT and load result with the closest approximation of value if value cannot be represented exactly. A value can be represented exactly as a Decimal64 if, for the significand and exponent of value, abs(significand) <= 9,999,999,999,999,999 and ‐398 <= exponent <= 369. The behavior is undefined unless isValidNumber(value) is true.
Return Value
0 if value can be represented exactly, and k_INEXACT otherwise
Parameters
Name |
Description |
result |
receives the converted |
value |
JSON number text to convert |
Created with MrDocs