1*be9b7050Sguenther /* $OpenBSD: infinity.c,v 1.4 2014/07/21 01:51:10 guenther Exp $ */ 2d987040fSdrahn /* $NetBSD: infinity.c,v 1.3 2002/02/19 20:08:19 bjh21 Exp $ */ 3d987040fSdrahn 4d987040fSdrahn /* 5d987040fSdrahn * IEEE-compatible infinity.c -- public domain. 6d987040fSdrahn */ 7d987040fSdrahn 8*be9b7050Sguenther #include <endian.h> 9d987040fSdrahn #include <math.h> 10d987040fSdrahn 11d987040fSdrahn char __infinity[] __attribute__((__aligned__(sizeof(double)))) = 12d987040fSdrahn #if BYTE_ORDER == BIG_ENDIAN 130b941c7cSdrahn { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0}; 14d987040fSdrahn #else 15d987040fSdrahn #ifdef __VFP_FP__ 160b941c7cSdrahn { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f}; 17d987040fSdrahn #else 180b941c7cSdrahn { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0}; 19d987040fSdrahn #endif 20d987040fSdrahn #endif 21