Skip to content

math: nan-related signops vary with C compiler. #1624

@Luyten-Orion

Description

@Luyten-Orion

Specification

In the C backend, signops on NaN are dependent on the C compiler used. My compiler is Clang 20.1.8, for reference.

Example

doAssert not signbit(NaN)

Actual Output

An assertion defect.

Expected Output

No output.

Possible Solution

A fix would be to always ensure that Nimskull's NaN is a positive NaN, though I'm not sure on how to do this.

Additional Information

I did try to see if a pure implementation of these ops would work, but it seems that the issue is with how NaN is defined rather than the function implementation.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions