Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NaN codes?

12 views
Skip to first unread message

luserdroog

unread,
Nov 7, 2022, 4:21:43 PM11/7/22
to
On a similar tangent to the idea I presented in another thread of re-using the
top byte of a 32bit code containing a Unicode code point in the lower bits,
there is a space of NaN representations in a double that could be overlaid
to store or transport data or control metadata in the same channel.

Under what circumstances would a language implementation wish to
use NaN codes overlaid in IEEE doubles?

James Harris

unread,
Nov 8, 2022, 6:12:27 AM11/8/22
to
Hard to say. What you suggest sounds a bit like a solution looking for a
problem. It may be better to get everything working with floats and
metadata occupying separate fields and only combine them later as an
optimisation, if you still think it's doable at that time.


--
James Harris



James Cloos

unread,
Nov 8, 2022, 1:10:10 PM11/8/22
to
keep in mind that not all hardware leaves the nan bits alone.

it seems to be more common of late thast they specify that all nan
results are canonical nans. whether signalling or quiet.

that was why R stopped using a specific nan payload to represent its NA
(Not Available) value. and canonical-only has only gotten more common
since then.

-JimC
--
James Cloos <cl...@jhcloos.com> OpenPGP: 0x997A9F17ED7DAEA6
0 new messages