Skip to content

Parser.float doesn't support large floats (above max int) #58

@Janiczek

Description

@Janiczek

18014398509610716 is an example of such float. When parsed you get 18014398509610720 back because Parser.float internally uses an (Int, Int) representation (before decimal point, after decimal point) and the number above is too large for an Int and loses precision.

An alternative: String.toFloat handles it fine, so I assume there is a (slower? and) more correct way to write Parser.float.

Metadata

Metadata

Assignees

No one assigned

    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