Skip to content

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

@Eswcvlad

Description

@Eswcvlad

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions