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 — Remove m_remainder() by skirpichev · Pull Request #158826 · python/cpython

Conversation

@skirpichev

@skirpichev skirpichev commented Oct 5, 2026

Copy link
Copy Markdown
Member

No description provided.

Sorry, something went wrong.

Uh oh!

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

All reactions
@skirpichev
Remove m_remainder()
a18af12
@skirpichev skirpichev added DO-NOT-MERGE 🔨 test-with-buildbots Test PR w/ buildbots; report in status section labels Oct 5, 2026
@bedevere-bot

bedevere-bot commented Oct 5, 2026

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @skirpichev for commit a18af12 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F158826%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 5, 2026
@skirpichev skirpichev mentioned this pull request Oct 5, 2026
gh-153144: Avoid checking errno for atan2 #153148
Open
@picnixz

picnixz commented Oct 5, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Can we have an issue about replacing our remainder with C math remainder?

All reactions

Sorry, something went wrong.

Uh oh!

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

@skirpichev

skirpichev commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

replacing our remainder with C math remainder?

It looks like it's already completely broken for Window$ (Tier 1) and Android (Tier 3). (In #101679 I did similar attempt for lgamma/tgamma. IIRIC, tests were broken on Win/Mac.)

So, it's not ready yet. Though, maybe it's a good idea to document why we need this implementation, with a list of broken platforms... For m_log*() functions things now might be better.

All reactions

Sorry, something went wrong.

Uh oh!

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

@skirpichev

skirpichev commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

Failures:

  1. For buildbot/aarch64 Android PR (same for amd64):
FAIL: testRemainder (test.test_math.MathTests.testRemainder)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/user/0/org.python.testbed/files/python/lib/python3.16/test/test_math.py", line 1858, in testRemainder
    validate_spec(x, y, actual)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/data/user/0/org.python.testbed/files/python/lib/python3.16/test/test_math.py", line 1770, in validate_spec
    self.assertEqual(n, int(n))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^
AssertionError: Fraction(-1, 25) != 0
  1. On Windows, e.g. buildbot/AMD64 Windows10 PR:
FAIL: testRemainder (test.test_math.MathTests.testRemainder)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\pull_request.bolen-windows10\build\Lib\test\test_math.py", line 1858, in testRemainder
    validate_spec(x, y, actual)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "D:\buildarea\pull_request.bolen-windows10\build\Lib\test\test_math.py", line 1767, in validate_spec
    self.assertLessEqual(abs(fr), abs(fy/2))
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
AssertionError: Fraction(3, 50600563326827654588123836679729326762389162441035529589225339506857584891998836722990095925359281123796769466079202977847452184346448369216753349985184627480379356069141590341116726935523304085309941919618186267140501870856173174654525838912289889085202514128089692388083353653807625633046581877161501565826926935273373696) not less than or equal to Fraction(23, 404804506614621236704990693437834614099113299528284236713802716054860679135990693783920767402874248990374155728633623822779617474771586953734026799881477019843034848553132722728933815484186432682479535356945490137124014966849385397236206711298319112681620113024717539104666829230461005064372655017292012526615415482186989568)

or on x32:

FAIL: testRemainder (test.test_math.MathTests.testRemainder)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\cpython\cpython\Lib\test\test_math.py", line 1858, in testRemainder
    validate_spec(x, y, actual)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "D:\a\cpython\cpython\Lib\test\test_math.py", line 1767, in validate_spec
    self.assertLessEqual(abs(fr), abs(fy/2))
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
AssertionError: Fraction(13, 202402253307310618352495346718917307049556649764142118356901358027430339567995346891960383701437124495187077864316811911389808737385793476867013399940738509921517424276566361364466907742093216341239767678472745068562007483424692698618103355649159556340810056512358769552333414615230502532186327508646006263307707741093494784) not less than or equal to Fraction(25, 404804506614621236704990693437834614099113299528284236713802716054860679135990693783920767402874248990374155728633623822779617474771586953734026799881477019843034848553132722728933815484186432682479535356945490137124014966849385397236206711298319112681620113024717539104666829230461005064372655017292012526615415482186989568)

BTW, I think it will be a good idea to modernize math tests (including above example) with using subTest method or subTests decorator.

All reactions

Sorry, something went wrong.

Uh oh!

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

@skirpichev skirpichev removed the DO-NOT-MERGE label Oct 6, 2026
@skirpichev skirpichev closed this Oct 6, 2026
@skirpichev
skirpichev deleted the remove-m_remainder branch October 6, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

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

@skirpichev @bedevere-bot @picnixz
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.