Return the closest floating point representation to this number.

Synopsis

Declared in <bdljsn_jsonnumber.h>

float
asFloat() const;

Description

If this number is outside the representable range, return +INF or ‐INF (as appropriate). Note that values smaller than the smallest representable non‐zero value (a.k.a, MIN) are rounded to MIN (positive or negative, as appropriate) or 0, whichever is the better approximation.

Return Value

the closest floating point representation to this number

Created with MrDocs