Subject: Re: [boost] [Review Request] Multiprecision Arithmetic Library
From: Christopher Kormanyos (e_float_at_[hidden])
Date: 2012-04-02 16:49:19
>> All the floating point types, have full std lib support (cos sin exp, pow
>> etc), as well as full interoperability with Boost.Math.
>> What is the precision of the following operations: *, /, +, -, sqrt
>> for the cpp_dec_float type?
> Good question, we don't really guarantee any at present.
> In practice they're *usually* accurate to 1eps,
> but they're not intended to compete with MPFR's guarantees.
> But Chris would know more?
My basic operations (add, sub, mul, div) are on-par or faster
for a variety of reasons. For example, I don't allocate---just use
std::array "on the stack".
Those GMP and MPFR guys can not program in a professionally
adherent fashion. But they sure do have efficient algorithms!
Their square root, exponential, logarithmic and trigonometric
functions beat mine hands down. I'd like to get a hold of their
algorithms and program them in a readable, portable fashion.
I think they use, for example, binary splitting for trigonometric functions,
whereas I use Taylor.
>> Any limitations on the maximum/minimum value of exponent?
> Must fit in a long long. That still gives some pretty big numbers ;-)
In other words, approx. 10^(10^19) for 64-bit long long.
The Python language MP stuff has unlimited exponents.
I forgot what that thing is called, but it's another cool tool.
Best regards, Chris.
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk