C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: What even happened to <net> and byte swapping?
From: Hyman Rosen (hyrosen_at_[hidden])
Date: 2021-02-26 10:54:55


>
> >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.

>



STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups