jk-jeon / dragonbox

Reference implementation of Dragonbox in C++
Apache License 2.0
588 stars 37 forks source link

Support a precision argument #38

Open alugowski opened 1 year ago

alugowski commented 1 year ago

It would be useful to have an option to specify desired output precision.

Especially for to_chars.

jk-jeon commented 1 year ago

I'm planning to have a separate repository with more complete feature set including that for the future, but for this repo I consider it out of scope. Note that precision specification is fundamentally incompatible with finding the shortest representation, and it requires a completely different algorithm. This is what I've been experimenting about it so far.

But as a reminder for people who want this feature I will leave this issue open until the new repo is ready.