On 2020-10-27 21:17 +0100, Marc Nieper-Wißkirchen wrote: > > > > > If the member used to access the contents of a union object is not > > > > > the same as the member last used to store a value in the object, the > > > > > appropriate part of the object representation of the value is > > > > > reinterpreted as an object representation in the new type as > > > > > described in 6.2.6 (a process sometimes called "type punning"). > > > > > This might be a trap representation. > > > > > > "Reinterpreted as an object ..." is again implementation-defined, > > > isn't it? Is there a way to find out how an IEEE double is mapped to > > > an array of chars? > > > > Yes, it seems so. (With ISO C, there's always more. I'm not really > > sure now whether their adding that footnote in the 2007 draft > > clarified anything.) > > I don't think ISO C can do much about it as the binary representation > of doubles is implementation-dependent. So, there cannot be a portable > implementation in C. Right, and whether the NaNs we examine have a quiet bit is also implementation-dependent. So the C implementation will just have to be as-portable-as-possible. The final say goes to the SRFI editor on whether that, plus an FFI layer, is an acceptable sample implementation. Regards, -- Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz> "Karate begins with courtesy and ends with it." --Shoshin Nagamine