Skip to content

Comparisons incorrect on leading zerosΒ #13

@david-a-wheeler

Description

@david-a-wheeler

The comment says:

The longest run of digits wins. That aside, the greatest
value wins, but we can't know that it will until we've scanned
both numbers to know that they have the same magnitude,
so we remember it in BIAS.

It should be the "longest run of digits ignoring leading zeros wins". E.g., given:

5
8
007

It should sort as 5, 007, 8 and not as 5, 8, 007.

Please note that I'm responding just based on a quick look at the source code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions