Repository navigation
Conversation
acosf passed out-of-range arguments to the host. glibc 2.39 returns 0x7fc00000 for them, where FreeBSD's e_acosf.c computes (x-x)/(x-x), which is 0xffc00000 on x86, so guest_math fails on Linux at the check that pins those bits. acosf now raises FE_INVALID and returns the negative quiet NaN itself, as asin already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VZWLdTjf1S57iLgn2rcaFb
Contributor
|
Windows check, since the description covers Linux only: Windows 11 (26300), WinLibs GCC 15.2.0 (UCRT), Release. Head
On unmodified |
10 tasks done
10 tasks done
10 tasks done
10 tasks done
Author
|
Superseded by #5256, which merged the same fix (FreeBSD's 0xffc00000 for |x| > 1, plus the quieted input NaN) into main. Closing. AI-assisted: yes (Claude Code) |
This was referenced Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
guest_mathfails on Linux at currentmain(0f2683c):CheckAcosfErrnofrom #3688 pinsacosf(±2.0f)to0xffc00000, FreeBSD's(x-x)/(x-x)on x86, butacosfpassed out-of-range arguments to the host, and glibc 2.39 (ubuntu-latest) returns0x7fc00000.acosfnow raisesFE_INVALIDand returns the negative quiet NaN for |x| > 1, asasindoes.Tested
Linux x86-64 (Ubuntu 24.04, glibc 2.39, GCC 13, Release):
guest_mathaborts with main'sMath.cppand passes with this change; the test now also covers ±infinity andFE_INVALID.guest_*tests matchmain.Windows not tested.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repositoryguest_mathonmain)