Support binary/hexadecimal string output#711
Conversation
0933759 to
94ca8ab
Compare
Adapted from mpmath#414. Partial fix for mpmath#345 Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> * 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 skirpichev@gmail.com
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.