Skip to content

compiler_rt: enable fmax and fmin to distinguish between 0.0 and -0.0 #24215

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

papparapa
Copy link
Contributor

Closes #24214

This PR enables fmax and fmin to differentiate between 0.0 and -0.0, making it compatible with musl.

Maybe we can remove the musl fmin and fmax that are not processor specific and that would be another PR.

Copy link
Contributor

@rpkak rpkak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Info from testing with zig-libc-test (on x86_64-linux-musl):

The test-cases fmax, fmaxf, fmaxl, fmin, fminf and fminl pass with zig master.

Without these lines:

zig/src/libs/musl.zig

Lines 924 to 929 in 4f40490

"musl/src/math/fmax.c",
"musl/src/math/fmaxf.c",
"musl/src/math/fmaxl.c",
"musl/src/math/fmin.c",
"musl/src/math/fminf.c",
"musl/src/math/fminl.c",

they fail with zig master, but pass with this PR.

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.

compiler_rt: fmax and fmin do not distinguish 0.0 and -0.0
2 participants