Skip to content

gh-135853: add math.fmax and math.fmin#135888

Merged
picnixz merged 13 commits intopython:mainfrom
picnixz:feat/math/fmin-fmax-135853
Jul 12, 2025
Merged

gh-135853: add math.fmax and math.fmin#135888
picnixz merged 13 commits intopython:mainfrom
picnixz:feat/math/fmin-fmax-135853

Conversation

@picnixz
Copy link
Copy Markdown
Member

@picnixz picnixz commented Jun 24, 2025

I've added math.fmin and math.fmax as I think it'd be nice to have the NaN handling as per C99. I didn't make those functions generic or accept any iterable argument.

WDYT of this proposal @skirpichev @rhettinger?


📚 Documentation preview 📚: https://cpython-previews--135888.org.readthedocs.build/

@picnixz picnixz changed the title gh-135853: add math.fmax and math.fmin gh-135853: add math.fmax and math.fmin [PoC] Jun 24, 2025
Comment thread Modules/mathmodule.c Outdated
Comment thread Modules/mathmodule.c Outdated
Comment thread Modules/mathmodule.c Outdated
@picnixz picnixz force-pushed the feat/math/fmin-fmax-135853 branch from 0831229 to afb0a91 Compare June 24, 2025 14:30
Comment thread Lib/test/test_math.py Outdated
@picnixz picnixz changed the title gh-135853: add math.fmax and math.fmin [PoC] gh-135853: add math.fmax and math.fmin Jun 24, 2025
Comment thread Lib/test/test_math.py Outdated
@picnixz picnixz marked this pull request as ready for review June 24, 2025 15:10
@picnixz picnixz requested a review from skirpichev June 24, 2025 15:10
@picnixz picnixz requested a review from rhettinger June 24, 2025 15:10
Comment thread Lib/test/test_math.py Outdated
Comment thread Lib/test/test_math.py
Comment thread Lib/test/test_math.py Outdated
Comment thread Misc/NEWS.d/next/Library/2025-06-24-13-30-47.gh-issue-135853.7ejTvK.rst Outdated
Comment thread Modules/mathmodule.c Outdated
Comment thread Doc/library/math.rst Outdated
@picnixz picnixz requested a review from vstinner June 27, 2025 13:51
Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread Doc/library/math.rst Outdated
Comment thread Doc/library/math.rst Outdated
Comment thread Lib/test/test_math.py Outdated
Comment thread Lib/test/test_math.py Outdated
Comment thread Lib/test/test_math.py Outdated
Comment thread Doc/library/math.rst
Comment thread Doc/library/math.rst
Comment thread Lib/test/test_math.py Outdated
Comment thread Lib/test/test_math.py Outdated
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Comment thread Lib/test/test_math.py Outdated
Comment thread Lib/test/test_math.py Outdated
@picnixz picnixz self-assigned this Jun 27, 2025
Comment thread Doc/library/math.rst
Comment thread Doc/library/math.rst Outdated
Comment thread Doc/library/math.rst Outdated
@picnixz picnixz enabled auto-merge (squash) July 12, 2025 11:06
@picnixz picnixz merged commit 2301cdb into python:main Jul 12, 2025
41 checks passed
@picnixz picnixz deleted the feat/math/fmin-fmax-135853 branch July 12, 2025 12:06
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
picnixz added a commit to picnixz/cpython that referenced this pull request Jul 13, 2025
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants