Boost logo

Boost Users :

Subject: Re: [Boost-users] converting to float128 from double
From: John Maddock (jz.maddock_at_[hidden])
Date: 2016-05-03 12:06:47


On 03/05/2016 13:44, Cooper, Bridgette R D wrote:
>
> Hi,
>
>
> I have a function that takes as an argument a vector of doubles and
> tries to convert it to a vector of float128.
>
>
> When I accumulate the values in the float128 vector it looks like it
> does double additions and only casts up at the last step.
>
>
> The initial vector is defined as conststd::vector<double>
>
> The float128 vector is defined as std::vector<float128> epoint(num)
>
>
> And I try to do the casting (inside a loop) via:
> epoint.at(i)=(float128(e8.at(i)));
>
>
> If I do the accumulation on the original vector with no casting into a
> float128, I get the same as accumulating the vector that should be of
> float128 type.
>
>
> How should I be doing the casting?
>

Sorry but you'll have to post way more code than that to see where the
mistake is.

John.

>
> Thanks,
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net