5 ms·
What is the alternative? Are there functions in the C standard to get mantissa and exponent?
by occamrazor 5y ago
What is the alternative? Are there functions in the C standard to get mantissa and exponent?
- gpderetta 5y agoFrexp modf. Last time I checked code generation wasn't particularly good.
- CyberRabbi 5y agoI already mentioned the alternative. memcpy() into a char array.
- Cloudef 5y agoMemcpy doesnt fix endianess
- CyberRabbi 5y agoIt was never claimed to deal with endianness and while we're on the subject of binary-layout, union-based binary manipulation is even worse on that front as no specific binary layout is mandated for structures or floating points.