
16 Dec
2008
16 Dec
'08
9:17 p.m.
on Tue Dec 16 2008, "Giovanni Piero Deretta" <gpderetta-AT-gmail.com> wrote:
On Tue, Dec 16, 2008 at 3:03 PM, Pyry Jahkola <pyry.jahkola@gmail.com> wrote:
Gevorg Voskanyan wrote:
I suggest modifying CastFloatIter() function to use memcpy for accessing floats as integers, as shown below:
Hmm, I don't think it's any better than reinterpret casting.
Yes it is. It has the nice property of not leading to UB.
If so, that surprises me. Is it really guaranteed that all valid floating-point bit patterns are also valid integer bit patterns? -- Dave Abrahams BoostPro Computing http://www.boostpro.com