Qore Programming Language Reference Manual 1.17.0
Loading...
Searching...
No Matches
Number Formatting Constants

Variables

const Qore::NF_Default = QORE_NF_DEFAULT
 for the default format with a rounding heuristic to try to remove noise in insignificant digits from the binary to digital conversion of high-precision numbers
 
const Qore::NF_Raw = QORE_NF_RAW
 for the raw format without the noise reduction heuristic in the NF_Default format More...
 
const Qore::NF_Scientific = QORE_NF_SCIENTIFIC
 for the scientific format (exponential notation)
 

Detailed Description

Variable Documentation

◆ NF_Raw

const Qore::NF_Raw = QORE_NF_RAW

for the raw format without the noise reduction heuristic in the NF_Default format

note that this can be combined with binary or with NF_Scientific as well to get an exponential output without rounding

Example:
string str = n.toString(NF_Scientific|NF_Raw);