Skip to content

Custom float printer for consistent default float printing #41

Open
@zkat

Description

@zkat

Currently, we pretty much just throw floats at format!("{:?}") and call it a day.

Unfortunately, this yields different results depending on Rust version (for example, 1.56 vs 1.60, so not even a big gap!).

So, we need to write our own that will follow a predictable pattern. Then we'll be able to re-enable the underscored tests that deal with floating point numbers that would otherwise fail.

Ideally, this formatter will be pretty smart about formatting exponent form (1.0e-10 etc), so the numbers also look nice, not just be correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions