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

Cleanup when writing floats as strings not working as expected #147

Closed
asmaloney opened this issue Oct 21, 2022 · 0 comments · Fixed by #214
Closed

Cleanup when writing floats as strings not working as expected #147

asmaloney opened this issue Oct 21, 2022 · 0 comments · Fixed by #214
Labels
bug Something isn't working

Comments

@asmaloney
Copy link
Owner

The impact is negligible since it's just the floating point representation in the XML portion of the file.

However, the code & comments indicate that these floating point numbers should be cleaned up when output, so 1.23456000000000000e+005 would become 1.23456e+005 and 2.00000000000000000e+005 would become 2e+005.

If we look at the new tests (see test_StringFunctions.cpp), it shows that the exponent parts may only be two digits instead of three (e.g. e+05) and so none of the cleanup happens (we end up with e+00).

I'm also not sure why all this effort is put in here to then leave e+005 instead of making it e+5...

@asmaloney asmaloney added the bug Something isn't working label Oct 21, 2022
asmaloney added a commit that referenced this issue Jan 20, 2023
The clean up strings wasn't working as expected.

Fix #147
asmaloney added a commit that referenced this issue Jan 20, 2023
The clean up strings wasn't working as expected.

Fix #147
asmaloney added a commit that referenced this issue Jan 20, 2023
The clean up of strings wasn't working as expected.

Fix #147
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
Development

Successfully merging a pull request may close this issue.

1 participant