GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-135853: add `math.fmax` and `math.fmin` by picnixz · Pull Request #135888 · python/cpython

Conversation

@picnixz

@picnixz picnixz commented Jun 24, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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?

  • Issue: Decide the fate of missing C99 functions in math #135853

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@picnixz
add math.fmax and math.fmin
a82d298
@bedevere-app bedevere-app Bot mentioned this pull request Jun 24, 2025
Decide the fate of missing C99 functions in math #135853
Closed
@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
picnixz
picnixz commented Jun 24, 2025
View reviewed changes
Comment thread Modules/mathmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

skirpichev
skirpichev reviewed Jun 24, 2025
View reviewed changes
Comment thread Modules/mathmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/mathmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@picnixz
address review
afb0a91
@picnixz
picnixz force-pushed the feat/math/fmin-fmax-135853 branch from 0831229 to afb0a91 Compare June 24, 2025 14:30
@picnixz
revert un-necessary change
62597d6
picnixz
picnixz commented Jun 24, 2025
View reviewed changes
Comment thread Lib/test/test_math.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@picnixz
Update Lib/test/test_math.py
a858aa1
@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
picnixz
picnixz commented Jun 24, 2025
View reviewed changes
Comment thread Lib/test/test_math.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@picnixz
Update Lib/test/test_math.py
f23a339
@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
@bedevere-app bedevere-app Bot added the awaiting core review label Jun 24, 2025
@picnixz
picnixz requested a review from rhettinger June 24, 2025 15:10
vstinner
vstinner reviewed Jun 24, 2025
View reviewed changes
Comment thread Lib/test/test_math.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_math.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_math.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

picnixz
picnixz commented Jun 27, 2025
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2025-06-24-13-30-47.gh-issue-135853.7ejTvK.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/mathmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/math.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@picnixz
address review and align tests with C11 standard
a61eca5
@picnixz
picnixz requested a review from vstinner June 27, 2025 13:51
vstinner
vstinner approved these changes Jun 27, 2025
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Jun 27, 2025
skirpichev
skirpichev approved these changes Jun 27, 2025
View reviewed changes
Comment thread Doc/library/math.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/math.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_math.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_math.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_math.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/math.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/math.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_math.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_math.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@picnixz @skirpichev
Apply suggestions from code review
92732bb
Co-authored-by: Sergey B Kirpichev <[email protected]>
picnixz
picnixz commented Jun 27, 2025
View reviewed changes
Comment thread Lib/test/test_math.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

picnixz added 2 commits June 27, 2025 18:06
@picnixz
Update Lib/test/test_math.py
e1bc272
@picnixz
improve test coverage
4e8277f
picnixz
picnixz commented Jun 27, 2025
View reviewed changes
Comment thread Lib/test/test_math.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@picnixz
remove misleading test
ba2e77c
@picnixz picnixz self-assigned this Jun 27, 2025
skirpichev
skirpichev reviewed Jun 28, 2025
View reviewed changes
Comment thread Doc/library/math.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/math.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/math.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

picnixz and others added 3 commits June 28, 2025 10:17
@picnixz @skirpichev
align signature style
c1742a6
Co-authored-by: Sergey B Kirpichev <[email protected]>
@picnixz
Merge remote-tracking branch 'upstream/main' into feat/math/fmin-fmax…
2d3967a
…-135853
@picnixz
Merge branch 'main' into feat/math/fmin-fmax-135853
18bdee6
@picnixz
picnixz enabled auto-merge (squash) July 12, 2025 11:06
@picnixz
picnixz merged commit 2301cdb into python:main Jul 12, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Jul 12, 2025
@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 @Pranjal095
pythongh-135853: add math.fmax and math.fmin (python#135888)
b2a5ad4
picnixz added a commit to picnixz/cpython that referenced this pull request Jul 13, 2025
@picnixz
pythongh-135853: add math.fmax and math.fmin (python#135888)
ab56fe6
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
@picnixz @taegyunkim
pythongh-135853: add math.fmax and math.fmin (python#135888)
8f140d2
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
@picnixz @Agent-Hellboy
pythongh-135853: add math.fmax and math.fmin (python#135888)
4694ff6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@skirpichev skirpichev skirpichev approved these changes
@vstinner vstinner vstinner approved these changes
@rhettinger rhettinger Awaiting requested review from rhettinger

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@picnixz picnixz

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@picnixz @vstinner @skirpichev
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.