Implemented the `__format__` method for the `_mpf` type.
Currently, `f`, `F`, `g`, `G`, `e`, and `E` formats are implemented, following the same specifications as specified for regular floats [here](https://docs.python.org/3/library/string.html#formatspec). Only nearest rounding is implemented.
A partial fix for #337.
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 #414.
Co-authored-by: Jonathan Warner <warnerjon12@gmail.com>
numpy numeric types now work with convert.
Also added support for Fraction and Decimal types.
Added a test and tested on Python 2.7 and 3.5.
Response to issue fredrik-johansson#382
* Move everything interval to a separate context (e.g. iv.exp must be used instead of mp.exp)
* Support both real and complex intervals (iv.mpf, iv.mpc)
* Fix interval cos/sin, and remove the old mpf_cos_sin code it depended on. The new interval cos/sin is a bit slower at low precision now, but this can be fixed.
* Implement interval atan2, and exp/log/power for complex intervals
* Move interval<->string code to libmpi
* Some other interface changes
More tests are still needed, and interface/utility functions needs more work.
* optimize and improve documentation for floor, ceil, isinf, isnan, isint
* implement nint, frac, isnormal
* fix and document semantics for isinf, isnan, etc
* extend documentation for mag and nint_distance
* add more tests; move tests for utility functions from test_mpmath.py to test_basic_ops.py