|
dconv 2.0
C++14 library for printing and parsing floating point numbers
|
Functions | |
| void | scaledBoundaries (double value, DiyFp &w, DiyFp &minus, DiyFp &plus, int &k) noexcept |
| compute the scaled value and its scaled boundaries. | |
| void | round (char *buffer, int length, uint64_t delta, uint64_t rest, uint64_t tenKappa, uint64_t wpW) noexcept |
| move the last digit closer to the value while it stays within the boundaries. | |
| void | digitsGen (const DiyFp &w, const DiyFp &high, uint64_t delta, char *buffer, int &length, int &k) noexcept |
| generate the shortest digits within the conservative boundaries. | |
| void | generate (char *buffer, int &length, int &k, double value) noexcept |
| write the shortest decimal digits within the conservative boundaries. | |
| char * | dtoa (char *buffer, double value) noexcept |
| double to string conversion using Grisu2. | |
|
inlinenoexcept |
generate the shortest digits within the conservative boundaries.
| w | scaled value. |
| high | conservative upper boundary. |
| delta | distance between the conservative boundaries. |
| buffer | buffer to write the digits to. |
| length | number of digits written. |
| k | decimal exponent. |
|
inlinenoexcept |
double to string conversion using Grisu2.
| buffer | buffer to write the string representation to (must point to at least 25 writable bytes). |
| value | value to convert. |
|
inlinenoexcept |
write the shortest decimal digits within the conservative boundaries.
| buffer | buffer to write the digits to. |
| length | number of digits written. |
| k | decimal exponent. |
| value | positive value to convert. |
|
inlinenoexcept |
move the last digit closer to the value while it stays within the boundaries.
| buffer | generated digits. |
| length | number of generated digits. |
| delta | distance between the boundaries. |
| rest | distance between the upper boundary and the generated number. |
| tenKappa | scaled power of ten of the last digit. |
| wpW | distance between the upper boundary and the value. |
|
inlinenoexcept |
compute the scaled value and its scaled boundaries.
| value | positive value to convert. |
| w | scaled value. |
| minus | scaled lower boundary. |
| plus | scaled upper boundary. |
| k | decimal exponent of the scaled values. |