1 1.1 kleink /* $NetBSD: infinityl_dbl_ieee754.c,v 1.1 2003/10/25 22:31:20 kleink Exp $ */ 2 1.1 kleink 3 1.1 kleink /* 4 1.1 kleink * IEEE-compatible infinityl.c -- public domain. 5 1.1 kleink * For platforms where long double == double. 6 1.1 kleink */ 7 1.1 kleink 8 1.1 kleink #include <float.h> 9 1.1 kleink #include <math.h> 10 1.1 kleink #include <machine/endian.h> 11 1.1 kleink 12 1.1 kleink #if LDBL_MANT_DIG != DBL_MANT_DIG 13 1.1 kleink #error double / long double mismatch 14 1.1 kleink #endif 15 1.1 kleink 16 1.1 kleink const union __long_double_u __infinityl = 17 1.1 kleink #if BYTE_ORDER == BIG_ENDIAN 18 1.1 kleink { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } }; 19 1.1 kleink #else 20 1.1 kleink { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } }; 21 1.1 kleink #endif 22