1 /* $OpenBSD: nan.c,v 1.2 2014/07/21 01:51:10 guenther Exp $ */ 2 3 /* Written by Martynas Venckus. Public Domain. */ 4 5 #include <endian.h> 6 #include <math.h> 7 8 /* bytes for qNaN on a sh (IEEE single format) */ 9 char __nan[] __attribute__((__aligned__(sizeof(float)))) = 10 #if BYTE_ORDER == BIG_ENDIAN 11 { 0x7f, 0xa0, 0, 0 }; 12 #else /* BYTE_ORDER == BIG_ENDIAN */ 13 { 0, 0, 0xa0, 0x7f }; 14 #endif /* BYTE_ORDER == BIG_ENDIAN */ 15