|
dconv 2.0
C++14 library for printing and parsing floating point numbers
|
Functions | |
| constexpr int | floorLog10Pow2 (int q, bool asymmetric) noexcept |
| compute floor (log10 (2^q)) or floor (log10 (3/4 * 2^q)). | |
| constexpr int | floorLog2Pow10 (int k) noexcept |
| compute floor (log2 (10^k)). | |
| uint64_t | roundToOdd (const details::Power &g, uint64_t cp) noexcept |
| multiply by a power of ten and round to odd. | |
| uint64_t | shortest (double value, int &k) noexcept |
| compute the shortest decimal significand. | |
| void | generate (char *buffer, int &length, int &k, double value) noexcept |
| write the shortest decimal digits. | |
| char * | dtoa (char *buffer, double value) noexcept |
| double to string conversion using Schubfach. | |
|
inlinenoexcept |
double to string conversion using Schubfach.
| buffer | buffer to write the string representation to (must point to at least 25 writable bytes). |
| value | value to convert. |
|
constexprnoexcept |
compute floor (log10 (2^q)) or floor (log10 (3/4 * 2^q)).
| q | binary exponent. |
| asymmetric | compute floor (log10 (3/4 * 2^q)) if true. |
|
constexprnoexcept |
compute floor (log2 (10^k)).
| k | decimal exponent. |
|
inlinenoexcept |
write the shortest decimal digits.
| buffer | buffer to write the digits to. |
| length | number of digits written. |
| k | decimal exponent. |
| value | positive value to convert. |
|
inlinenoexcept |
multiply by a power of ten and round to odd.
| g | power of ten. |
| cp | value to multiply. |
|
inlinenoexcept |
compute the shortest decimal significand.
| value | positive value to convert. |
| k | decimal exponent. |