FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-122681: merge m_atan2() and c_atan2() helper functions by skirpichev · Pull Request #122682 · python/cpython · GitHub

/ cpython Public

gh-122681: merge m_atan2() and c_atan2() helper functions - #122682

Merged
vstinner merged 7 commits into
python:mainfrom
skirpichev:m_atan2-122681
Aug 6, 2024
Merged

gh-122681: merge m_atan2() and c_atan2() helper functions#122682
vstinner merged 7 commits into
python:mainfrom
skirpichev:m_atan2-122681

Conversation

skirpichev commented Aug 5, 2024
edited
Loading

Copy link
Copy Markdown
Member

For reviewers: as it mentioned in the issue, I think it worth to try removing these workarounds. Most cmath's functions are using libm's atan2() and this don't poses any problems. If that does make sense, here is a draft pr to test this: #122715.

Comment thread Modules/_math.h
is necessary to get consistent behaviour across platforms.
Windows, FreeBSD and alpha Tru64 are amongst platforms that don't
always follow C99. Windows screws up atan2 for inf and nan, and
alpha Tru64 5.1 doesn't follow C99 for atan2(0., 0.).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm curious if Windows and FreeBSD still need these workaround in 2024. But I don't ask you to test ;-)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm curious if Windows and FreeBSD still need these workaround in 2024.

I doubt, especially FreeBSD.

As I said in the description, most functions in the cmath works with libm's atan2 function (e.g. acos). I think it's safe to remove these helpers. But this should be heavily tested. Here is a draft pr with this attempt: #122715

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I doubt, especially FreeBSD.

Right. When I added math.fma(), I found a bug on FreeBSD. It takes a while to get it fixed upstream, but it's being fixed: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277783 :-)

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

vstinner commented Aug 6, 2024

Copy link
Copy Markdown
Member

I merged the main branch into this PR to retrieve the Hypothesis workaround (pin attrs version).

vstinner merged commit 0b433aa into python:main Aug 6, 2024

vstinner commented Aug 6, 2024

Copy link
Copy Markdown
Member

Merged. Thank you.

skirpichev deleted the m_atan2-122681 branch August 6, 2024 12:48
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL