Subject: Re: [boost] [Review Request] Multiprecision Arithmetic Library
From: Christopher Kormanyos (e_float_at_[hidden])
Date: 2012-04-11 17:09:43
Sorry, John my file was too big and admin rejected
post. The candidate file is now 7-zip and should make it through.
>> I experimented with FFTs. We need your inputs if we *really*
>> want to make very high-precision available at this stage.
>> maybe about 30 lines of code.
> Nice, had no idea it could be implemented in such a small space!
Ooops, my bad. It was 100 lines. I guess I was in a daze by then.
> So my gut feeling is to hold off for now, and maybe do things
> properly later (dynamic allocation, better std lib support etc)?
I agree. We should pull the reigns on it for now. We won't get the reliability
we need if we try to do something fast. I could go on indefinitely with big-numbs,
but we have to get that first version potentially reviewed. I should really get back
to my book project soon. But I'm definitely in on any relevant review issues.
> I think the existing ones work out quite nicely now thanks,
> I could use some ideas for integer and maybe rational number examples,
> but that's a whole other ball game ;-)
I'm not an integer guy. Maybe someone could help us out here.
But what springs to my mind is:
* Prime factorization
* Greatest common denominator (GCD)
* Primality testing for Mersenne Primes (has an exceptionally simple algo)
* MD5, SHA-1, 2, etc. (but cool std::uint32_t reference apps already exist)<snip>
>> I resolved the excessive guard digit issue and reduced the guard digits
>> to the necessary amount (and provide rationale in a code comment).
> Sure, or mail me a patch and I'll run the full tests
> (or you can - just cd into libs/multiprecision/test and
> do a "bjam --enable-specfun" and then wait for a long time!)
> Thanks, John.
OK. I attached my proposed version in /big_number/multiprecision/cpp_dec_float.hpp.
The diffs include the removal of some non-needed constants, the trimming of
max_digits10 and a minor improvement to the multiplication.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk