|
dconv 2.0
C++14 library for printing and parsing floating point numbers
|
schubfachpowgen is a command-line tool that generates the lookup table of powers of 10 used by the Schubfach algorithm.
Each power of 10 is stored on 126 bits, rounded up, as a high and a low 64-bit word.
The tool outputs a fully self-contained C++ header containing:
MIN_EXPONENT, MAX_EXPONENTPower { uint64_t hi; uint64_t lo; } structureconstexpr Power powers[] lookup table| Option | Description |
|---|---|
-h | Show help message |
-l <lower> | Set lower exponent (default: -292) |
-u <upper> | Set upper exponent (default: 324) |
-v | Show program version |
Generate powers for exponents −200 through +200 and write them to power.hpp:
The generated header will contain definitions like: