summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2015-02-11 08:49:27 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2015-02-11 08:49:27 -0500
commit3823048b64b018d16e9a9cc16add1847fe60e6bd (patch)
tree56b0b59dc0f1320cdb90bcf68e1c45a76acc43df /perl.h
parent4258cf903c752ec19a3aeee9b93020533d923e1a (diff)
downloadperl-3823048b64b018d16e9a9cc16add1847fe60e6bd.tar.gz
infnan: revert nan payload/signaling changes
4258cf903c752ec19a3aeee9b93020533d923e1a 91e945c051cfcdf499d5b43aa5ac0a5681cdd595 eb254f2672a985ec3c34810f624f36c18fc35fc7 c9a671b17a9c588469bcef958038daaaaf9cc88b 99fcdd4df47515fb0a62a046e622adec0871754d ba511db061a88439acb528a66c780ab574bb4fb0 0d1cf11425608e9be019f27a3a4575bc71c49e6b c2ea8a88f8537d00ba25ec8feb63ef5dc085ef2b b5a6eedc2f49a90089cca896ee20f41e373fb4c9 30419b527d2c5a06cefe2db9183f59e2697c47fc 29b62199cd4c359dfc6b9d690341de40d105ca5f be181dc9d91c84a2fe03912c993c8259fed92641 4de1bcfe1abdaba0a5da394ddea0cc6fd7e36c7b 6e915616c4ccb4f6cc3122c5d395765db96c0a2d b2e3501558a1017eb529be0915c25d31671e7869 bfaa02d55f4ace1571e6fa9e5b47d5e3ac3cecc6 569f27e562618bdddcf4a9fc71612283a73747e9 4f89311dc8de87ddc9a302c6f2d2c844951bbd28 a307a0b0d83c509cc2adaad8cebb44260294bf36 6640aa2c3b93d7ac78e4e86983fe5948b3ca55f2 b74dc0b3c96390d8bf83d8c3ffc0c2c2d1f0a5d3 c3a8e5a5b4bb89a15de642c023dfd5cbc4678938
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h35
1 files changed, 3 insertions, 32 deletions
diff --git a/perl.h b/perl.h
index b4ac7f5621..b6dbf61ea1 100644
--- a/perl.h
+++ b/perl.h
@@ -4319,6 +4319,7 @@ static const union { unsigned int __i; float __f; } __PL_inf_u =
# define NV_QNAN LDBL_QNAN
# endif
# if !defined(NV_NAN) && defined(LDBL_SNAN)
+# define NV_NAN LDBL_SNAN
# define NV_SNAN LDBL_SNAN
# endif
#endif
@@ -4330,6 +4331,7 @@ static const union { unsigned int __i; float __f; } __PL_inf_u =
# define NV_QNAN DBL_QNAN
#endif
#if !defined(NV_NAN) && defined(DBL_SNAN)
+# define NV_NAN (NV)DBL_SNAN
# define NV_SNAN DBL_SNAN
#endif
#if !defined(NV_NAN) && defined(NAN)
@@ -4340,6 +4342,7 @@ static const union { unsigned int __i; float __f; } __PL_inf_u =
# define NV_QNAN QNAN
#endif
#if !defined(NV_NAN) && defined(SNAN)
+# define NV_NAN (NV)SNAN
# define NV_SNAN SNAN
#endif
#if !defined(NV_NAN) && defined(I_SUNMATH)
@@ -4363,38 +4366,6 @@ static const union { unsigned int __i; float __f; } __PL_nan_u =
* Though IEEE-754-logically correct, some compilers (like Visual C 2003)
* falsely misoptimize that to zero (x-x is zero, right?) */
-/* x86 80-bit extended precision mantissa bits:
- *
- * 63 62 61 30387+ pre-387
- * -------- ---- --------
- * 0 0 0 invalid infinity
- * 0 0 n invalid snan
- * 0 1 * invalid snan
- * 1 0 0 infinity snan
- * 1 0 n snan
- * 1 1 0 qnan (1.#IND)
- * 1 1 n qnan
- *
- * This means that there are 61 bits for nan payload.
- */
-#if defined(USE_LONG_DOUBLE) && (LONG_DOUBLEKIND == LONG_DOUBLE_IS_X86_80_BIT_LITTLE_ENDIAN)
-# define NV_NAN_BITS 61
-#elif defined(__hppa) /* XXX Configure scan */
-# define NV_NAN_BITS 50 /* qnan: 7f f4 00 00 00 00 00 00 */
-#elif defined(__mips) && UVSIZE == 4 /* IRIX64/MIPS cc -32 */
-# define NV_NAN_BITS 35 /* qnan: 7f ff 2f 30 00 00 00 00
- * +inf: 7f ff 2f 20 00 00 00 00
- * -inf: 7f ff 2f 28 00 00 00 00 */
-#else
-# define NV_NAN_BITS (NV_MANT_REAL_DIG - 1)
-#endif
-/* IRIX64/MIPS cc -64 is something bizarre:
- * qnan 00 00 0f ff ff ff ae 90
- * +inf 00 00 0f ff ff ff ae 80
- * -inf 00 00 0f ff ff ff ae 88
- * In other words, it doesn't seem to follow any IEEE pattern for infnan,
- * and even seems more little-endian than big-endian. */
-
#ifndef __cplusplus
# if !defined(WIN32) && !defined(VMS)
#ifndef crypt