Repository navigation
Select the principal branch of complex acosh in both half-planes - #1436
agourakis82 wants to merge 1 commit into
Conversation
DiamonDinoia
left a comment
There was a problem hiding this comment.
This is okay but still I need to see a rebase.
5ea398a to
68e43b0
Compare
68e43b0 to
003ba7e
Compare
|
Published in f1ad98f. I made this candidate self-contained by including the necessary real-axis The existing typed acosh fixtures now include imaginary parts On macOS ARM64 with Apple Clang 21 and C++23, the scoped complex hyperbolic and complex trigonometric tests pass four cases in each mode, with 96 assertions in strict mode and 64 in fast-math. Restoring the inherited pre-fix Prepared with OpenAI Codex assistance. |
Take the nonnegative imaginary magnitude of acos and the sign of imag(z). Keep the signed real-axis asin branch so the cut matches std::acosh.
f1ad98f to
d7819f4
Compare
|
Superseded by #1456 |
Complex acosh was built as
(-imag(acos(z)), real(acos(z))), which leaves the lower half-plane on the wrong branch. It now returns the nonnegative imaginary magnitude of acos and the sign ofimag(z). The same change keeps the signed real-axis asin correction, so acosh on the cut agrees withstd::acosh. An 8 by 8 grid, including(2, -1)and both sides of the cut, is compared withstd::acoshwith and without fast-math.Part of #1432.
Written by me with AI assistance.