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

Single and Double numeric formats may not round-trip successfully using CsvWriter #1260

Closed
glopesdev opened this issue Feb 22, 2023 · 0 comments · Fixed by #1261
Closed

Single and Double numeric formats may not round-trip successfully using CsvWriter #1260

glopesdev opened this issue Feb 22, 2023 · 0 comments · Fixed by #1261
Labels
bug Something isn't working
Milestone

Comments

@glopesdev
Copy link
Member

We have detected that Single (32-bit float) or Double (64-bit float) recorded into CSV may not round-trip successfully in the microsecond range for sufficiently large numbers. We have traced down the problem to the formatting defaults of the General Format Specifier of the ToString method, which use G7 and G15 respectively as max precision defaults on .NET framework.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant