Skip to content

Precision for Float32 too high #44

Description

@ffreyer

With Float32 inputs a single bit of difference can cause all digits to be written to a string:

Showoff.showoff(Float32[0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.90000004], :plain)
# ["0.30000001", "0.40000001", "0.50000000", "0.60000002", "0.69999999", "0.80000001", "0.90000004"]
nextfloat(0.9f0)
# 0.90000004f0

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