summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1991-03-27 02:37:36 +0000
committerRoland McGrath <roland@gnu.org>1991-03-27 02:37:36 +0000
commit5cf0d0fc3234282d04ca3a9ef4421922b84330d3 (patch)
tree5e0fdd1b20289cc242552b62a2de650736176d36 /math
parentab5046305ee1739c7d0abecaf4fb9b365f22c76b (diff)
Initial revision
Diffstat (limited to 'math')
-rw-r--r--math/finite.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/math/finite.c b/math/finite.c
new file mode 100644
index 0000000000..ecb88ed156
--- /dev/null
+++ b/math/finite.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU C Library; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <math.h>
+
+#undef __finite
+
+/* Return nonzero if VALUE is finite (or NaN). */
+int
+DEFUN(__finite, (value), double value)
+{
+ return !__isinf(value);
+}