4 ms·
> Perhaps you're lucky enough to exist in a different reality? Any code I've touched that was going to deal with boxing had enough control over the build syste
by Dylan16807 4y ago
> Perhaps you're lucky enough to exist in a different reality?
Any code I've touched that was going to deal with boxing had enough control over the build system to avoid that.
> More generally, yes, but in the specific context of preserving a NaN payload I would not trust the optimizer to keep my NaN payloads untouched when stored as a floating point value. LLVM developers appear to agree that NaN payload preservation is not guaranteed - I guess you can quote me on my earlier "optimizers can butcher your NaN payloads", presumably even without fast math optimizations:
That looks like it only butchers the NaN if you do math on it or try to have compile-time NaNs, which shouldn't be an issue here? Are there other factors making it worse that I'm missing in a quick read?
> A union is acceptable in the sense that at least, then, you're supposedly storing an integer, and the bit pattern of that would be preserved.
Oh, you're suggesting a union as permanent storage, not just to perform the cast. That makes sense.