
Simonson, Lucanus J wrote <snip>
Multiprecision::mp_float needs to behave in all ways as much like a regular float as reasonably possible to make its substitution into other boost libraries feasible.
boost::multiprecision::mp_float will behave like a POD. Interaction with other PODs and the proper behavior with I/O streams are all implemented and test routines exist for these. Paul Bristow has dedicated a great deal of time to the standardization of boost::multiprecision::mp_float. With his patient cooperation, we are reaching a very high level of floating point standardization including some of the most minute levels of floating point behavior (infinities, NaNs, true equality, precision with o-streams, div by zero, overflow, underflow, etc.). ...And it's still got high performance to-boot. The name change from boost::e_float to boost::multiprecision::mp_float has not yet taken place. My work is still called boost::e_float. If you want to get a preview, you can take a look at boost::e_float in the sandbox. The software is ripe, but not yet boost-ready. boost::multiprecision::mp_float will include wrappers for my own portable EFX, as well as for GMP and MPFR. This is all in the sandbox, available as compiler switch options or via project selection with VS2010. Native plug-in compatibility with boost::math as well as with John's future big_number (or whatever it will be called) without the need for special bindings is planned (not quite finished, but close).
The design of the multi-precision library will necessarily involve some trade-offs. I looks like the current bignum expression templates will improve the performance of my own code (wrt number of allocations) if I substitute it for gmpq_class, and I'm pretty happy with that overall.
John needs to correct me if I get this wrong, but... Remember that John is working on a higher-level interface for big number math involving expression templates. He will be making wrappers for GMP, MPFR, NTL and boost::multiprecision::mp_float. He has *big* plans extending all the way from integer to float to rational and beyond. The big number back-end to John's templates are selected via template parameters.
I don't think a boost multiprecision library needs to be perfect, I'll be satisfied that it is an improvement on gmp's own expression templates.
Regards, Luke
Nothing is ever perfect. But when we are finished, we will be one tiny step closer to high-precision math that *behaves* in the C++ way. Sincerely, Chris.