Skip to content

Fix fmin/fmax movability flags#145

Merged
pavpanchekha merged 3 commits into
fix-copysignfrom
fix-fmin-fmax-movability
Feb 7, 2026
Merged

Fix fmin/fmax movability flags#145
pavpanchekha merged 3 commits into
fix-copysignfrom
fix-fmin-fmax-movability

Conversation

@pavpanchekha

Copy link
Copy Markdown
Contributor

This PR fixes fmin, fmax, and fdim, which were failing the new refinement tests of #143. Basically the issue is that movability for fmin (and the others) is actually asymmetric. Consider the low vs high endpoints of fmin(x, y). The low endpoint is fixed if the smaller low endpoint of x and y is fixed. But the high endpoint is fixed only if both endpoints are fixed (or in a few other cases that don't seem worth bothering with). This asymmetry wasn't captured by the code, which just used endpoint-min for both endpoints, and that resulted in fixed endpoints that weren't supposed to be fixed.

@pavpanchekha
pavpanchekha merged commit 3560e43 into fix-copysign Feb 7, 2026
1 check passed
@pavpanchekha
pavpanchekha deleted the fix-fmin-fmax-movability branch February 7, 2026 21:28
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

Successfully merging this pull request may close these issues.

1 participant