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

Increase default max number of significant digits for floating-point values in CsvWriter #1261

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

glopesdev
Copy link
Member

@glopesdev glopesdev commented Feb 22, 2023

This PR overrides the default maximum number of significant digits when formatting floating-point values to ensure they can round-trip successfully using CsvReader or other applications.

The formatting defaults of the General format specifier use G7 and G15 respectively as max precision defaults on .NET framework.

In the guidelines for using the Round-trip format specifier the recommendation is to use G9 and G17 respectively for maximum fidelity.

The defaults have been fixed in .NET Core 3.0 onwards, but we need the override until we move out of .NET framework.

Fixes #1260

@glopesdev glopesdev added the fix Pull request that fixes an issue label Feb 22, 2023
@glopesdev glopesdev merged commit 581d45e into bonsai-rx:main Feb 22, 2023
@glopesdev glopesdev deleted the issue-1260 branch February 22, 2023 22:54
@glopesdev glopesdev added this to the 2.8 milestone Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull request that fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single and Double numeric formats may not round-trip successfully using CsvWriter
1 participant