Skip to content

Conversation

WarrenWeckesser
Copy link
Contributor

I noticed this bug in 1.4.0a1 and the master branch, where asc=False is ignored by polyval:

In [1]: import mpmath

In [2]: mpmath.__version__
Out[2]: '1.4.0a2.dev79+gd5c8e0c.d20240820'

In [3]: from mpmath import mp

In [4]: c = [1, 2, 3]

In [5]: mp.polyval(c, 2.0, asc=True)
Out[5]: mpf('17.0')

In [6]: mp.polyval(c, 2.0, asc=False)
Out[6]: mpf('17.0')

@skirpichev skirpichev added bug an unexpected problem or unintended behavior and removed bug an unexpected problem or unintended behavior labels Aug 21, 2024
@skirpichev skirpichev merged commit 0824715 into mpmath:master Aug 21, 2024
10 checks passed
@WarrenWeckesser WarrenWeckesser deleted the fix-polyval-asc branch August 21, 2024 04:27
@skirpichev
Copy link
Collaborator

skirpichev commented Aug 21, 2024

Thanks for the fix. It seems I forgot "if" clause in polyroots() too. See 23606c6.

@skirpichev
Copy link
Collaborator

see #845

@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.

2 participants