Skip to content

Misc fixes#703

Merged
skirpichev merged 4 commits into
mpmath:masterfrom
skirpichev:misc
Jun 5, 2023
Merged

Misc fixes#703
skirpichev merged 4 commits into
mpmath:masterfrom
skirpichev:misc

Conversation

@skirpichev

Copy link
Copy Markdown
Collaborator

No description provided.

skirpichev and others added 4 commits June 3, 2023 14:33
base=2**n and base=10 are supported so far.  float(), float.fromhex()
and MPFR's style (see mpfr_strtofr() function) string formats are
accepted.  to/from_bstr() undocumented helper functions were removed.

Partially taken from mpmath#414.

Co-authored-by: Jonathan Warner <[email protected]>
Co-authored-by: Jonathan Warner <[email protected]>
This change includes two hypsum related fixes:

1) It turns the ValueError exception, raised in mp.hypsum when encountering
convergence problems, into a more appropriate NoConvergence exception - just as
fp.hypsum does already.

2) It properly handles this NoConvergence exception withing the "fast path" of
hyp2f1. The same behavior is already used in the "fast path"s of _hyp2f0,
_hypq1fq, and _hyp_borel - and was broken since hypsum never raised the
expected NoConvergence exception (in the mp context). Similar to _hyp2f0, this
behavior can be suppressed with the keyword argument force_series=True.

Co-authored-by: Sergey B Kirpichev <[email protected]>

Coverage tests added.
@skirpichev skirpichev merged commit e745906 into mpmath:master Jun 5, 2023
@skirpichev skirpichev deleted the misc branch June 5, 2023 09:16
@skirpichev skirpichev mentioned this pull request Jun 5, 2023
@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