| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| conversions | ||
| iterators | ||
| parsing | ||
| exceptions.hpp | ||
| json_ref.hpp | ||
| macro_scope.hpp | ||
| macro_unscope.hpp | ||
| meta.hpp | ||
| serializer.hpp | ||
| value_t.hpp |
This is an attempt to fix #360. The algorithm produces decimal representations which are guaranteed to roundtrip and in ~99.8% actually produces the shortest possible representation. So this is a nice compromise between using a precision of digits10 and max_digits10. Note 1: The implementation only works for IEEE single/double precision numbers. So the old implementation is kept for compatibility with non-IEEE implementations and 'long double'. Note 2: If number_float_t is 'float', not all serialized numbers can be recovered using strtod (strtof works, though). (There is exactly one such number and the result is off by 1 ulp.) This can be avoided by changing the implementation (the fix is trivial), but then the resulting decimal numbers are not exactly short.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| conversions | Loading commit data... | |
| iterators | Loading commit data... | |
| parsing | Loading commit data... | |
| exceptions.hpp | Loading commit data... | |
| json_ref.hpp | Loading commit data... | |
| macro_scope.hpp | Loading commit data... | |
| macro_unscope.hpp | Loading commit data... | |
| meta.hpp | Loading commit data... | |
| serializer.hpp | Loading commit data... | |
| value_t.hpp | Loading commit data... |