julia
3e9f2f78 - runtime: Use `__builtin_signbit` for mingw signbit

Commit
9 days ago
runtime: Use `__builtin_signbit` for mingw signbit On i686, mingw-w64's math.h defines an inline __signbit that returns 0 or 0x200, while the out-of-line libmingwex version returns 0 or 1. GCC 15 emits calls to the out-of-line function but folds `!signbit(x)` assuming the inline definition's result, so `!signbit(a) == !signbit(b)` always compares false vs true. This breaks the sign comparison in the round-to-odd step of `fma_narrow`, making the runtime Float32/Float16/BFloat16 `fma_float` round in the wrong direction whenever the rounding error and the result have opposite signs. CI failure: https://buildkite.com/julialang/julia-pr/builds/3179#01a0f076-7498-49fa-95f0-cac9923f1db9 Assisted-by: Claude Code (Claude Opus 5.5)
Author
Parents
Loading