|
Boost : |
Subject: Re: [boost] Name and Namespace forPotential BoostExtended Floating-Point
From: Christopher Kormanyos (e_float_at_[hidden])
Date: 2011-09-04 14:19:02
Christopher Kormanyos wrote:
>> boost::multiprecision::mp_float will behave like a POD.
Dave Abrahams wrote:
> That would mean you could copy it with memcpy. But that's not what you
> intend to say, is it?
No, just normal stuff such as instances of boost::multiprecision::mp_float
constructed and copied from other PODs like a regular float, double or long double.
For example:
boost::multiprecision::mp_float x = 4.4;
boost::multiprecision::mp_float y = x / 3;
std::cout << std::setprecision(std::numeric_limits<boost::multiprecision::mp_float>::digits10)
<< std::scientific
<< boost::multipreccision::sqrt(x / y)
<< std::endl;
... and so on...
But if you have a sequence of them, they can be copied with
std::copy or set with std::fill, and the lot.
Sincerely, Chris.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk