Skip to content

f32::ZERO and f64::ZERO are not the additive identity #352

@Muon

Description

@Muon

f32::ZERO and f64::ZERO are currently +0.0, which is not the additive identity. For non-NaN f32 and f64 under default rounding, the additive identity is -0.0 and not +0.0, since (-0.0) + (+0.0) == (+0.0) but (-0.0) + (-0.0) == (-0.0). (EDIT: interpreting == bitwise.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions