2 ms·
> the double-precision format has 52 bits for the mantissa, which means there are 51 bits available for the payload. I have seen data passed through the NaN pa
by rdtsc 9y ago
> the double-precision format has 52 bits for the mantissa, which means there are 51 bits available for the payload.
I have seen data passed through the NaN payload in C in a signal processing application. It was both vile and genius at the same time. Vile because of how hackish it was, genius because it avoided a larger redesign of the application.
- hermitdev 9y agoFirst thought I had when reading about this is that the unused bits would be perfect for potentially reporting a cause of the NaN. A bit hackish, sure, but potentially useful, especially in C where you don't have exceptions that can carry human readable explanations of what wrong to arrive at a NaN.