Subject: Re: [boost] [Review Request] Multiprecision Arithmetic Library
From: Christopher Kormanyos (e_float_at_[hidden])
Date: 2012-04-04 17:10:13
>> And let's not forget to mention in the documentation
>> that the cpp_dec_float back-end (in the present implementation)
>> is limited to < 500 (need to check) decimal digits of precision.
> Nope, I didn't set an upper limit on the number of digits - except of course that the type will grow too large to instantiate / allocate on the stack if too many are used. I should note that though.
> Thanks, John.
Unfortunately, it's worse than that. My O(N^2), base-10^8
school-method multiplication stores multiple carries in its
rows of the multiplication algorithm. These can
can potentially overflow 64-bit.
Also, since cpp_dec_float does not climb the
digit scale elegantly switching from school O(N^2)
multiply to Karatsuba to FFT, the N^2 crushes efficiency
for more than a few hundred digits. I had originally set
an upper limit of 300 decimal digits.
It's so critical that I would maybe go so far as to
use a static_assert on it.
This is one of the weakest parts of my original design
and one that I would be most interested in eliminating
in future versions.
Best regards, Chris.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk