Boost logo

Boost Users :

Subject: [Boost-users] converting to float128 from double
From: Cooper, Bridgette R D (b.cooper_at_[hidden])
Date: 2016-05-03 08:44:34


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 const std::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?

Thanks,



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