Boost logo

Boost :

Subject: Re: [boost] Arbitrary precision arithmetic
From: joel (joel.falcou_at_[hidden])
Date: 2009-08-19 12:22:21


Barend Gehrels wrote:
> Hi,
>
>
> Paul A. Bristow wrote:
>>> The boost community is not set up to duplicate what GMP does. But I
>>> think we could do something else very well if we focus on correctness,
>>> portability, and metaprogramming API tastiness instead of making the
>>> tires smoke.
>>>
>>
>> Or better, as recently proposed, also allow one to use GMP if desired.
>> That should get the tires warm, if not smoking.
>>
> You might refer to our mails this spring. We (Bruno and I) are
> implementing a 'numeric adaptor' library, to be optionally used in our
> generic geometry library, but developed completely separately.
>
> It is currently in the Boost Sandbox,
> https://svn.boost.org/svn/boost/sandbox/numeric_adaptor/
>
> It provides interfaces to GMP and CLN (another big number library),
> which can be used the same way as normal (IEEE) integers / doubles can
> be used. We recently changed and simplified the design. It now works
> more or less as Joel mailed today. It is template based, no virtual
> functions here. So Joel's sample would become:
>
> double x;
> boost::numeric_adaptor::gmp_value_type y;
> x = abs(x); <-- call the IEEE implementation
> y = abs(y); <-- call the GMP implementation
Interesting. I may give a shot at this using my framework and see how it
goes.

-- 
___________________________________________
Joel Falcou - Assistant Professor
PARALL Team - LRI - Universite Paris Sud XI
Tel : (+33)1 69 15 66 35

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk