|
dconv 1.0
C++14 library for printing and parsing floating point numbers
|
dconv is a C++14 library for printing and parsing floating point numbers.
Double to string conversion is done using the Grisu2 algorithm, described by Florian Loitsch in its publication Printing Floating-Point Numbers Quickly and Accurately with Integers.
String to double conversion uses a fast-path implementation based on the Eisel-Lemire algorithm, with automatic fallback to strtod when inputs exceed the range or precision safely handled by the fast algorithm.
The code is far from being perfect so any help to improve speed, accuratie, code quality etc... is welcome.
To install dconv dependencies do this:
To download the latest source do this:
To configure dconv do this:
To build dconv do this:
The printing API can be used this way:
The parsing API can be used this way: