[MPL.Math] big_integral and unsigned_big_integral

Once again, the latest offering is at <http://boost-consulting.com/vault/>, inside Template Metaprogramming. The ability to write constants like big_integral<positive_sign,1,0,4,8,5,7,6> has returned. In addition, you can also write a constant like unsigned_big_integral<1,0,4,8,5,7,6>, which is equivalent to the above. The two missing pieces wrt full functionality are division and human-readable output. The latter is easier to tackle but will most likely require a corresponding runtime big-integer class. Is anybody (e.g. Christopher Diggins) still working on one? If so, I might use it as a value_type. In a future version I'll probably get rid of positive_sign and negative_sign and just have the user specify '+' or '-'. Peder, I've made changes to the following files: * <boost/mpl/math/numerator.hpp> * <boost/mpl/math/denominator.hpp> * <boost/mpl/math/whole_part.hpp> * <boost/mpl/math/rational_part.hpp> * <boost/mpl/math/big_integral_tag.hpp> * <boost/mpl/math/big_integral_fwd.hpp> * everything in boost/mpl/math/big_integral_ and boost/mpl/math/big_integral_/aux_ * <boost/mpl/math/big_integral.hpp> * <boost/mpl/math/rational.hpp> * <boost/mpl/math/mixed_number.hpp> * <boost/mpl/math/complex_number.hpp> * examples/big_integral.cpp * test/big_integral.cpp Cromwell D. Enage __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com

--- David Abrahams wrote:
In a future version I'll probably get rid of positive_sign and negative_sign and just have the user specify '+' or '-'.
I consider that essential.
Done. Files removed: <boost/mpl/math/number_sign.hpp> Files changed: <boost/mpl/math/big_integral_fwd.hpp> <boost/mpl/math/big_integral.hpp> Cromwell D. Enage __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/

--- Cromwell Enage wrote:
The two missing pieces wrt full functionality are division and human-readable output. The latter is easier to tackle but will most likely require a corresponding runtime big-integer class.
Did I say human-readable output was easier to tackle? What was I thinking? Division, modulus, and even GCD are now usable wrt big_integral and unsigned_big_integral. I still don't see a way to avoid recursion, so certain parameters will cause GCD to go deeper than any compiler can currently handle. (Try adjusting BOOST_MPL_LIMIT_UNROLLING and see if that improves the situation.) However, you can now extract the rational/fractional part of any double without running afoul of this gotcha.
Is anybody (e.g. Christopher Diggins) still working on one? If so, I might use it as a value_type.
In the next version I'll use "long double" as a stub value_type until Boost assimilates a run-time big integer class/library. Cromwell D. Enage __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
participants (2)
-
Cromwell Enage
-
David Abrahams