From ea58277c8b98514ce5bdb4b481ee2275485486d6 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Wed, 30 Sep 2015 03:13:23 +0300 Subject: [PATCH] Double union quiet NaN notes --- src/duk_dblunion.h.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/duk_dblunion.h.in b/src/duk_dblunion.h.in index 3c1dbff3..ca104782 100644 --- a/src/duk_dblunion.h.in +++ b/src/duk_dblunion.h.in @@ -203,7 +203,7 @@ typedef union duk_double_union duk_double_union; * * When packed duk_tval is used, the NaN space is used to store pointers * and other tagged values in addition to NaNs. Actual NaNs are normalized - * to a specific format. The macros below are used by the implementation + * to a specific quiet NaN. The macros below are used by the implementation * to check and normalize NaN values when they might be created. The macros * are essentially NOPs when the non-packed duk_tval representation is used. * @@ -211,7 +211,8 @@ typedef union duk_double_union duk_double_union; * the packed duk_tval and works correctly for all NaNs except those that * begin with 0x7ff0. Since the 'normalized NaN' values used with packed * duk_tval begin with 0x7ff8, the partial check is reliable when packed - * duk_tval is used. + * duk_tval is used. The 0x7ff8 prefix means the normalized NaN will be a + * quiet NaN regardless of its remaining lower bits. * * The ME variant below is specifically for ARM byte order, which has the * feature that while doubles have a mixed byte order (32107654), unsigned