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

A more correct implementation of float to string (correct except for … #184

Merged
merged 1 commit into from
Apr 13, 2017
Merged

A more correct implementation of float to string (correct except for … #184

merged 1 commit into from
Apr 13, 2017

Conversation

Virindi-AC
Copy link
Contributor

…floating point inaccuracy). The old one had numerous issues, see #183.

Fixes #183

This implementation is not perfect, but it is a heck of a lot better than what it was. I included some simple test code that shows it is correct to within rounding error.

Note that writing a dtoa function is deceptively difficult. The original author of this code does not seem to have done much testing of his overly simplistic implementation (if any). If absolute correctness to CLR specs is desired, it may be a good idea to just accept the GC cost of an intermediate string. Otherwise, this new code should be "good enough".

…floating point inaccuracy). The old one had numerous issues, see #183.
@ferram4
Copy link
Owner

ferram4 commented Apr 13, 2017

LGTM

@ferram4 ferram4 merged commit b035cb6 into ferram4:KSP_update Apr 13, 2017
@Virindi-AC Virindi-AC deleted the KSP_update branch April 30, 2017 23:30
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.

2 participants