Skip to content

Use math.isqrt in isqrt_python calculations#695

Merged
skirpichev merged 2 commits intompmath:masterfrom
haru-44:math_isqrt
May 10, 2023
Merged

Use math.isqrt in isqrt_python calculations#695
skirpichev merged 2 commits intompmath:masterfrom
haru-44:math_isqrt

Conversation

@haru-44
Copy link
Contributor

@haru-44 haru-44 commented May 8, 2023

The isqrt_python calculation is faster using math.isqrt when x is small.

For speed comparisons, see the following PR

sympy/sympy#25111

Copy link
Collaborator

@skirpichev skirpichev left a comment

Choose a reason for hiding this comment

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

So, please just use math.isqrt for isqrt, isqrt_fast, etc for python versions >= 3.12, if the BACKEND is not 'gmpy' or 'sage'.

@skirpichev skirpichev merged commit 25c60dd into mpmath:master May 10, 2023
@haru-44 haru-44 deleted the math_isqrt branch May 14, 2023 14:22
@skirpichev skirpichev added this to the 1.4 milestone May 9, 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