Skip to content

assertion failed: !nan.is_sign_positive() && !nan.is_sign_negative() #312

@cuviper

Description

@cuviper
Member

The standard library has changed behavior: issue rust-lang/rust#42425, pr rust-lang/rust#42431

This breaks our tests on nightly:

---- src/float.rs - float::Float::is_sign_positive (line 329) stdout ----
	thread 'rustc' panicked at 'test executable failed:

thread 'main' panicked at 'assertion failed: !nan.is_sign_positive() && !nan.is_sign_negative()', <anon>:14
note: Run with `RUST_BACKTRACE=1` for a backtrace.

', /checkout/src/librustdoc/test.rs:318
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- src/float.rs - float::Float::is_sign_negative (line 348) stdout ----
	thread 'rustc' panicked at 'test executable failed:

thread 'main' panicked at 'assertion failed: !nan.is_sign_positive() && !nan.is_sign_negative()', <anon>:14
note: Run with `RUST_BACKTRACE=1` for a backtrace.

', /checkout/src/librustdoc/test.rs:318


failures:
    src/float.rs - float::Float::is_sign_negative (line 348)
    src/float.rs - float::Float::is_sign_positive (line 329)

I think we'll have to drop our own expectations about NaN here, and just let it follow whatever std does, whether old or new. We also have our own implementations for no_std on the next branch, which should probably follow the new behavior.

Activity

PlasmaPower

PlasmaPower commented on Jul 8, 2017

@PlasmaPower
Contributor

I'm working on this.

added a commit that references this issue on Jul 10, 2017
cuviper

cuviper commented on Sep 22, 2017

@cuviper
MemberAuthor

This is fixed on both master and next now.

added a commit that references this issue on Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @cuviper@PlasmaPower

        Issue actions

          assertion failed: !nan.is_sign_positive() && !nan.is_sign_negative() · Issue #312 · rust-num/num