xref: /freebsd/lib/libc/arm/gen/infinity.c (revision 559a218c9b257775fb249b67945fe4a05b7a6b9f)
12357939bSOlivier Houchard /*
22357939bSOlivier Houchard  * infinity.c
32357939bSOlivier Houchard  */
42357939bSOlivier Houchard 
52357939bSOlivier Houchard #include <math.h>
62357939bSOlivier Houchard 
72357939bSOlivier Houchard /* bytes for +Infinity on a 387 */
82357939bSOlivier Houchard const union __infinity_un __infinity = {
92357939bSOlivier Houchard #if BYTE_ORDER == BIG_ENDIAN
102357939bSOlivier Houchard 	{ 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
112357939bSOlivier Houchard #else
122357939bSOlivier Houchard 	{ 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
132357939bSOlivier Houchard #endif
142357939bSOlivier Houchard };
152357939bSOlivier Houchard 
162357939bSOlivier Houchard /* bytes for NaN */
172357939bSOlivier Houchard const union __nan_un __nan = {
182357939bSOlivier Houchard #if BYTE_ORDER == BIG_ENDIAN
192357939bSOlivier Houchard 	{0xff, 0xc0, 0, 0}
202357939bSOlivier Houchard #else
212357939bSOlivier Houchard 	{ 0, 0, 0xc0, 0xff }
222357939bSOlivier Houchard #endif
232357939bSOlivier Houchard };
24