Boost logo

Boost :

Subject: Re: [boost] questions about boost multiprecision
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2019-03-21 23:00:15


AMDG

On 3/21/19 4:44 PM, Robert Ramey via Boost wrote:
> I'm looking more carefully at Boost Multiprecision than I have in the
> past and have a couple of questions:
>
> It's not clear to me how errors are handled.  For example, what happens
> in a divide by zero?

std::overflow_error. This is documented for the
individual backends.

>  Or what happens when a result overflows.

It depends on the specific type. cpp_int describes
what it does here:
https://www.boost.org/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/cpp_int.html

> I'm aware
> that this will likely vary depending on whether the arguments are
> arbitrary precision made a runtime or a precision fixed at compile time.
>  In any case, looking through the manual I can't find this information.
>  Of course this package is so ambitious, that it's possible that I've
> missed it but in that case a pointer would be appreciated.
>
> Spending some time on this makes me appreciate what an incredibly
> ambitious accomplishment this is.  It's really unbelievable.  I would be
> curious how frequently various parts of the package are used.
>

In Christ,
Steven Watanabe


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