Skip to content

Different NaN types on mipsel and mips64el than on most other architectures #68925

Open
@silwol

Description

@silwol

The following tests fail on mipsel and mips64el architectures while succeeding most others.

#[cfg(test)]
mod tests {
    #[test]
    fn min() {
        assert_eq!(1f64.min(std::f64::NAN), 1f64);
    }
    #[test]
    fn max() {
        assert_eq!(1f64.max(std::f64::NAN), 1f64);
    }
}

It succeeded on mipsel up to stable 1.36.0 rustc, and started failing in 1.37.0 and newer. I'll attempt to use cargo-bisect-rustc track down the exact nightly version that introduced the change (might take some time because it's a qemu vm that is rather slow).

#52897 (comment) was where the initial discussion started, but it seems to be worth a separate issue instead of creating noise there.

It looks as if the failing platforms have a signaling NAN (sNAN) in opposite to the succeeding ones with a quiet NAN (qNAN).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-MIPSTarget: MIPS processorsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions