C++ Logo


Advanced search

Re: What even happened to <net> and byte swapping?

From: Hyman Rosen <hyrosen_at_[hidden]>
Date: Fri, 26 Feb 2021 11:54:55 -0500
> >And what if there's IEEE floats in there?
>> That's just another type.
Note that you cannot pass around byte-swapped IEEE floats and doubles by
value. Some of those will have the representation of signalling NaNs, and
we know of one case, gcc using the x87 coprocessor, where it converts them
to quiet NaNs, which means that if you byte-swap them back, you get the
wrong value, with one bit changed from 0 to 1 in the significand.


Received on 2021-02-26 10:55:13