Skip to content

Specify negative-returning behavior of abs method #16707

@klutzy

Description

@klutzy

Currently ::std::i64::MIN.abs() returns ::std::i64::MIN.
I don't think this is absolutely "wrong", but then at least it should be specified that "abs() method can return negative values".

Currently std::num::abs() says it can return NaN for floats, but no mention for general situation.

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