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