Fixes #133895 by abhigyan631 · Pull Request #133923 · python/cpython · GitHub
Skip to content

Fixes #133895 - #133923

Closed
abhigyan631 wants to merge 2 commits into
python:mainfrom
abhigyan631:fix-math-errors
Closed

abhigyan631 wants to merge 2 commits into
python:mainfrom
abhigyan631:fix-math-errors

Conversation

@abhigyan631

Copy link
Copy Markdown
 This PR modifies the error handling in math and cmath modules to include the computed result value when raising ValueError and OverflowError exceptions. This is particularly useful for applications that need to adhere to C99 Annex G recommendations.

 Changes made:
 - Modified is_error() in mathmodule.c to include computed result value
 - Modified math_error() in cmathmodule.c to include computed result value
 - Added tests to verify the changes

@bedevere-app

bedevere-app Bot commented May 12, 2025

Copy link
Copy Markdown

@python-cla-bot

python-cla-bot Bot commented May 12, 2025

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

bedevere-app Bot commented May 12, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@AA-Turner

Copy link
Copy Markdown
Member

cc @skirpichev, but this PR feels LLM-generated.

@skirpichev

Copy link
Copy Markdown
Member

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.

3 participants