-
Notifications
You must be signed in to change notification settings - Fork 190
Support binary/hexadecimal string output #711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0933759
to
94ca8ab
Compare
Adapted from mpmath#414. Partial fix for mpmath#345 Co-authored-by: Sergey B Kirpichev <[email protected]> * this version doesn't touch argument names (dps->ps) * no support for float.hex()-style binary exponents
7ff54f0
to
4a3eae2
Compare
This is ready for review. I would like to merge this in few days to use that for |
How would you use this functionality with mpf rather than
It looks like the
|
First, we could provide
Yes, strings with prefixes should be accepted automatically. Most important case is hexadecimal floats, of course - this will allow us to pass exact floating point values to the mpf constructor (see also CPython pr: python/cpython#114668). But to handle arbitrary bases we should add |
Adapted from #414.
Closes #345
Co-authored-by: Sergey B Kirpichev [email protected]
no support for float.hex()-style binary exponentsPS:
from_str()
part was implemented in #703. @asmeurer, I would appreciate your review, as you've opened #345.