summaryrefslogtreecommitdiff
path: root/libc/misc/internals/zoicheck.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-12-20 22:52:58 +0000
committerEric Andersen <andersen@codepoet.org>2000-12-20 22:52:58 +0000
commitc6218dbae579de0cd20f5a7f1e9877673e28225d (patch)
tree0fc8aaf54189b8ef6a2d130c12539814e0a724ee /libc/misc/internals/zoicheck.c
parent97112ff6f4f2a1dcd4c7f8a7512e0a4a02a2a332 (diff)
A number of updates from Manuel Novoa III. Things look good...
Diffstat (limited to 'libc/misc/internals/zoicheck.c')
-rw-r--r--libc/misc/internals/zoicheck.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libc/misc/internals/zoicheck.c b/libc/misc/internals/zoicheck.c
new file mode 100644
index 000000000..2113c6298
--- /dev/null
+++ b/libc/misc/internals/zoicheck.c
@@ -0,0 +1,16 @@
+
+/*
+ * Copyright (C) 2000 Manuel Novoa III
+ *
+ * This is a utility routine for strtod errno support.
+ * As the name implies, it checks if a double is either 0 or +/-infinity.
+ * Doing this inline doesn't work on i386 because of excess precission
+ * stored in the FPU.
+ *
+ * TODO: Check bitmasks directly?
+ */
+
+int _zero_or_inf_check(double x)
+{
+ return ( x == x/4 );
+}