Skip to content

Complex signed NaN test fails on Darwin/Aarch64 #38419

@Keno

Description

@Keno
Test Failed at /Users/julia/julia23/test/complex.jl:1049
  Expression: isequal(one(T) / complex(T(Inf), T(-NaN)), complex(zero(T), zero(T)))
   Evaluated: isequal(0.0f0 - 0.0f0im, 0.0f0 + 0.0f0im)
Test Failed at /Users/julia/julia23/test/complex.jl:1054
  Expression: isequal(one(T) / complex(T(-Inf), T(-NaN)), complex(-(zero(T)), zero(T)))
   Evaluated: isequal(-0.0f0 - 0.0f0im, -0.0f0 + 0.0f0im)
Test Failed at /Users/julia/julia23/test/complex.jl:1067
  Expression: isequal(one(T) / complex(T(-NaN), T(Inf)), complex(-(zero(T)), -(zero(T))))
   Evaluated: isequal(0.0f0 - 0.0f0im, -0.0f0 - 0.0f0im)
Test Failed at /Users/julia/julia23/test/complex.jl:1071
  Expression: isequal(one(T) / complex(T(-NaN), T(-Inf)), complex(-(zero(T)), zero(T)))
   Evaluated: isequal(0.0f0 + 0.0f0im, -0.0f0 + 0.0f0im)

The reason for this seems to be that Apple turns on the RunFast flag, which normalizes away the sign bit of the NaN on certain operations. The question is to what extent we want to allow that or do we need to turn off RunFast or adjust the test or one of the implementations? Note that these tests do pass for Float64, only Float32 is at issue.

cc @stevengj

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions