Repository navigation
Preserve the imaginary zero sign in complex log1p - #1438
Closed
agourakis82 wants to merge 1 commit into
Closed
agourakis82 wants to merge 1 commit into
agourakis82 wants to merge 1 commit into
Conversation
DiamonDinoia
reviewed
Nov 5, 2026
agourakis82
force-pushed
the
fix/complex-log1p-branch-cut-1432
branch
3 times, most recently
from
November 8, 2026 19:09
3e39c58 to
eb742cb
Compare
Add 1 to the real part only, so a negative imaginary zero is not flushed before log.
cursor
Bot
force-pushed
the
fix/complex-log1p-branch-cut-1432
branch
from
November 11, 2026 00:09
eb742cb to
49da11d
Compare
Contributor
|
Superseded by #1456 |
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.
Complex log1p added 1 with a complex broadcast, which replaced a negative imaginary zero by a positive zero before the logarithm, so
log1p(-2, -0)took the upper side of the branch cut. The translation now adds 1 to the real part only. An 8 by 8 grid compares the batch withstd::log(1 + real, imag), including a point just below-1and signed zeros, with and without fast-math. The point-1itself stays out of the grid.Part of #1432.
Written by me with AI assistance.