Skip to content

Misc fixes#703

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

Misc fixes#703
skirpichev merged 4 commits intompmath:masterfrom
skirpichev:misc

Conversation

@skirpichev
Copy link
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.
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