blob: 6c75f3060c2daaf19409ebde16afa9a0cf0990d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/* $OpenBSD: nan.c,v 1.1 2008/07/24 09:31:06 martynas Exp $ */
/* Written by Martynas Venckus. Public Domain. */
#include <sys/types.h>
#include <math.h>
#include <machine/endian.h>
/* bytes for qNaN on an arm (IEEE single format) */
char __nan[] __attribute__((__aligned__(sizeof(float)))) =
#if BYTE_ORDER == BIG_ENDIAN
{ 0x7f, 0xc0, 0, 0 };
#else /* BYTE_ORDER == BIG_ENDIAN */
{ 0, 0, 0xc0, 0x7f };
#endif /* BYTE_ORDER == BIG_ENDIAN */
|