fix: prettier floating point numbers
Add dragonbox to compute the required precision to print floating point numbers. This avoids uglification of floating point numbers that happen by default via std::stringstream. Numbers like 34.34 used to be converted to '34.340000000000003' as strings. With this version they will be converted to the string '34.34'. This fixes issue https://github.com/jbeder/yaml-cpp/issues/1289
Showing
include/yaml-cpp/contrib/dragonbox.h
0 → 100644
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
include/yaml-cpp/fp_to_string.h
0 → 100644
test/fp_to_string_test.cpp
0 → 100644
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment