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

Incorrect non-10-base floating point parsing with spaces #183

Open
Eswcvlad opened this issue Jul 19, 2024 · 0 comments
Open

Incorrect non-10-base floating point parsing with spaces #183

Eswcvlad opened this issue Jul 19, 2024 · 0 comments
Assignees

Comments

@Eswcvlad
Copy link

Looks like spaces at the end count as the fractional part, which ruins the result:

toNumber("070.070", 8) -> 56.109375
toNumber("070.070 ", 8) -> 56.013671875
toNumber("070.070 ", 8) -> 56.001708984375

toNumber("0F0.0F0", 16) -> 240.05859375
toNumber("0F0.0F0 ", 16) -> 240.003662109375
toNumber("0F0.0F0 ", 16) -> 240.00022888183594

@JohnBrinkman JohnBrinkman self-assigned this Nov 18, 2024
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

No branches or pull requests

2 participants