jk-jeon / dragonbox

Reference implementation of Dragonbox in C++
Apache License 2.0
607 stars 39 forks source link

Bug: to_decimal(0.0f) will cause core dump #43

Closed Rose1917 closed 1 year ago

jk-jeon commented 1 year ago

Thanks for reporting, but this is not a bug.

From Readme:

Importantjkj::dragonbox::to_decimal is designed to work only with finite nonzero inputs. The behavior of it when given with infinities/NaN's/+0/-0 is undefined. jkj::dragonbox::to_chars and jkj::dragonbox::to_chars_n work fine for any inputs.