Qore Programming Language Reference Manual  0.8.11.1
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

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:
my string $str = $n.toString(NF_Scientific|NF_Raw);