Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dtoa() for optimal encoding of reals #680

Merged
merged 8 commits into from
Mar 31, 2024
Merged

Use dtoa() for optimal encoding of reals #680

merged 8 commits into from
Mar 31, 2024

Conversation

akheron
Copy link
Owner

@akheron akheron commented Mar 15, 2024

Use David M. Gay's dtoa() algorithm to avoid issues like printing 7.6 as 7.5999999999999996.

If this is not wanted, the feature can be disabled in the compile time by:

./configure --disable-dtoa

or

cmake -DUSE_DTOA=off .

@akheron akheron force-pushed the dtoa branch 2 times, most recently from 3a80e46 to 216578f Compare March 15, 2024 20:54
@akheron akheron force-pushed the dtoa branch 3 times, most recently from f00b949 to d8eb707 Compare March 19, 2024 16:06
@akheron akheron changed the title Use dtoa() for optimal floating point conversions Use dtoa() for optimal encoding of reals Mar 19, 2024
@akheron akheron force-pushed the dtoa branch 6 times, most recently from 08425b7 to 3167300 Compare March 25, 2024 17:18
@akheron akheron marked this pull request as ready for review March 25, 2024 18:21
@akheron akheron merged commit 50953fb into master Mar 31, 2024
18 checks passed
@akheron akheron deleted the dtoa branch March 31, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant