test(libc): cover the untested libm exports #1844
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1844"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by NahuelGenchi on 2026-10-08T21:26:04Z.
What
The same scan for libc exports that no test mentions found 36 in
Math.cpp. Almost all of them forward to the host libm, so nothing would notice a swapped argument or a wrong overload. This addsguest_math_basics:__isfinite,__isnan,__signbitand the float variants, including negative zero, infinities, NaN and the smallest subnormal.fmod(sign followsx, NaN for a zero divisor or infinitex),remainderf(ties to even),roundf(halves away from zero,-0.4gives negative zero),modfandmodff(the integral part keeps the sign, even for-0.5),ldexpfoverflowing to infinity,exp2fandlog2fon powers of two,powf(NaN, 0),tanhat the infinities,atan2with a signed zero,acosandasinoutside their domain.cbrt,log10,tan, the inverse trigonometric functions,sincosandsincosf,expf,logf,sinf,cosf, and_FSinhand_FCosh(which scale by their second argument).Left out:
randandsrand, because checking them would mean copying the generator into the test.No library code changes.
Tested
Ubuntu 26.04, GCC 15.2. The new test passes, and I flipped one expectation to confirm it aborts when a result is wrong. The convention checks pass. Not run on Windows locally, so the Windows job is the first run there; the exact comparisons are limited to results the standard fixes, but it will show if the Windows runtime disagrees on any of them.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T08:57:05Z.
Same as #1843, for
Math.cpp.Pull request closed