Repository navigation
Conversation
…nding mode Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
…nding mode Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
Part of boykopovar#23411.
What
expandcoshreturned the largest finite double on overflow when rounding down or toward zero, because their overflow branches returned the run-time producthuge * huge.coshthen also lefterrnoalone, because it setsERANGEonly for an infinite result.Both now evaluate the product for its flags and return +inf, as boykopovar#24160 did for
exp2. This is the reading in the rounding-mode section of boykopovar#23411: on overflow thelibc.prxbundled with PPSA10122 returns +inf withERANGE,FE_OVERFLOWandFE_INEXACTin all four modes. The underflow branches are unchanged, since that reading has them follow the rounding mode.expfandcoshfare not touched; open boykopovar#10113, boykopovar#21714 and boykopovar#11109 hold them.The only callers that can pass
expan overflowing argument are outsideMath.cpp:sinh,coshand theerftail stay below the threshold. Open boykopovar#28071 adds callers ofexpandcoshfor the complex functions; in the two directed modes those would now see +inf where they sawDBL_MAX.In the thread, the overflow rows were asked for on 19 November and
exp2followed as boykopovar#24160. I found no PR or branch forexporcoshsince, so I took these two; say so if that work is still in progress and I will close this.tools/pr_overlap.pycould not compare boykopovar#6295 and boykopovar#21714, which conflict withmain. I read both diffs: boykopovar#6295 adds thenextafterfamily and boykopovar#21714 changesexpfandtgammaf; neither changesexporcosh.Tested
Windows 11, MinGW-w64 GCC 16.2, Release.
guest_math,guest_math_exact,guest_math_elementary,guest_complex_trigandguest_complex_trig_longpass. The newCheckExpCoshOverflowRoundingchecksexp(709.9),cosh(711)andcosh(-711)in the four rounding modes, and pinsexp(-745.2)andcosh(710.4)as they were. Without theMath.cppchangeguest_mathaborts in that check.I do not have the bundled
libc.prx, so the module's behaviour is taken from boykopovar#23411 and was not run here.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 repository (attach them to this PR)🤖 Generated with Claude Code
Summary by CodeRabbit