JuliaMath / JuliaMath/Quadmath.jl

Float128 fma() subtly corrupts state on Windows

Open
#31 14 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
44
Forks
13
PR merge metrics
No merged PRs in 30d

Description

On Windows (but not Linux or OSX) calls to `fma()` somehow break the overflow handling.

```julia
julia> h, x = floatmax(Float128), Float128(1)
julia> h + h
inf
julia> fma(x,x,x);
julia> h + h
1.18973149535723176508575932662800701e+4932
```

I don't see anything wrong with our wrappers; it may be a libquadmath and/or libgcc issue.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Float128 overflow sequence on Windows and compare it with Linux or OSX. Inspect the Julia wrappers around fma() and investigate the suspected libquadmath or libgcc interaction. Done means calling fma() no longer changes subsequent overflow handling, with the comparison behavior verified across platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.