Skip to content

fixed floating number leading zeroes serialization #22

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Guiorgy
Copy link

@Guiorgy Guiorgy commented Jun 29, 2025

Fixes #21, though ideally I'd want to implement automatic serialization that doesn't require to be passed the precision argument.

Edit: Added a commit that attempts to remove trailing zeroes, so jim_float(&jim, 3.1415, 10); results in 3.1415, however, this isn't perfect as can be observed in the following example: jim_float(&jim, 3.014, 10); -> 3.0139999999 :/

@Guiorgy Guiorgy force-pushed the fix_float_leading_zeros branch from 540ba0d to a707474 Compare June 29, 2025 15:48
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.

Floating point number serialization ignores leading zeroes after the decimal point
1 participant