summaryrefslogtreecommitdiff
path: root/lib/libc/arch/hppa64/gen/nan.c
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2008-07-24 09:31:08 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2008-07-24 09:31:08 +0000
commit32ce90013e67e48625b106481449cbc0273c9a09 (patch)
tree60ae8b08b0204363ecd694ec015820aa03e02bb9 /lib/libc/arch/hppa64/gen/nan.c
parenta4a31c8ba6ef66cebd6cfb35c065d837ce7e796c (diff)
- move isinf, isnan dups to gen, since most is ieee 754
- is{inf,nan} should be macros for real-floating, so rename to __is{inf,nan}, per C99 - implement C99 __fpclassify(), __fpclassifyf(), __isfinite(), __isfinitef(), __isnormal(), __isnormalf(), __signbit(), __signbitf() - long functions added, but not yet enabled, till ieee.h is fixed - implement vax equivalents of the functions - reimplement isinff, isnanf in a better way, and move to libc - add qnan bytes for all archs - bump major man pages will follow ok millert@. arm bits looked over by drahn@ discussed w/ theo, who showed the right direction, to put these functions in libc
Diffstat (limited to 'lib/libc/arch/hppa64/gen/nan.c')
-rw-r--r--lib/libc/arch/hppa64/gen/nan.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libc/arch/hppa64/gen/nan.c b/lib/libc/arch/hppa64/gen/nan.c
new file mode 100644
index 00000000000..7af3cb148f8
--- /dev/null
+++ b/lib/libc/arch/hppa64/gen/nan.c
@@ -0,0 +1,9 @@
+/* $OpenBSD: nan.c,v 1.1 2008/07/24 09:31:06 martynas Exp $ */
+
+/* Written by Martynas Venckus. Public Domain. */
+
+#include <math.h>
+
+/* bytes for qNaN on a hppa64 (IEEE single format) */
+char __nan[] __attribute__((__aligned__(sizeof(float)))) =
+ { 0x7f, 0xa0, 0, 0 };