Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some tests failing on macOS #78

Closed
cossio opened this issue Nov 11, 2023 · 4 comments
Closed

Some tests failing on macOS #78

cossio opened this issue Nov 11, 2023 · 4 comments

Comments

@cossio
Copy link
Contributor

cossio commented Nov 11, 2023

Running the test suite on macOS I get:

log2mexp: Test Failed at ~/Julia/Forks/LogExpFunctions.jl/test/basicfuns.jl:173
  Expression: log2mexp(-(T(1))) ≈ log(2 - exp(-(T(1))))
   Evaluated: 0.23447205f0 ≈ 0.48988014f0

Tests pass on Ubuntu (which the only platform currently covered by CI).

@devmotion
Copy link
Member

Possibly caused by the bug fixed in JuliaLang/julia#50989 (see the discussion in #74)? Can you try with Julia 1.10 or master?

@devmotion
Copy link
Member

You can check whether you're Julia version is affected by the bug e.g. by

for T in (Float32, Float16)
    @test expm1(T(-1.1))  expm1(big(T(-1.1)))
end

(the test added in the Julia bugfix) or checking the output of

julia> Float16(expm1(-exp(big(Float16(0.1)))))
Float16(-0.669)

julia> expm1(-exp(Float16(0.1)))
Float16(-0.338)

julia> Float32(expm1(-exp(big(Float32(0.1)))))
-0.6688457f0

julia> expm1(-exp(Float32(0.1)))
-0.3376915f0

@cossio
Copy link
Contributor Author

cossio commented Nov 11, 2023

Yes, this fails locally (Julia v1.9.3, macOS Apple Silicon).

julia> for T in (Float32, Float16)
           @test expm1(T(-1.1)) ≈ expm1(big(T(-1.1)))
       end
Test Failed at REPL[2]:2
  Expression: expm1(T(-1.1)) ≈ expm1(big(T(-1.1)))
   Evaluated: 0.3314843f0 ≈ -0.6671289242381854320328428151544398867406350331677158671036144147852732255543603

Feel free to close this issue. I could try 1.10 when the stable comes out.

@devmotion
Copy link
Member

It will also be part of Julia 1.9.4: JuliaLang/julia@v1.9.3...release-1.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants