diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-11-22 14:04:29 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-11-22 14:04:29 +0000 |
commit | 7ce331c01ce6eb7b3f5c715a38a24359da9c6ee2 (patch) | |
tree | 3a7e8476e868ae15f4da1b7ce26b2db6f434468c /libm/ldouble/nantst.c | |
parent | c117dd5fb183afb1a4790a6f6110d88704be6bf8 (diff) |
Totally rework the math library, this time based on the MacOs X
math library (which is itself based on the math lib from FreeBSD).
-Erik
Diffstat (limited to 'libm/ldouble/nantst.c')
-rw-r--r-- | libm/ldouble/nantst.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/libm/ldouble/nantst.c b/libm/ldouble/nantst.c deleted file mode 100644 index 855a43b5a..000000000 --- a/libm/ldouble/nantst.c +++ /dev/null @@ -1,61 +0,0 @@ -#include <stdio.h> -long double inf = 1.0f/0.0f; -long double nnn = 1.0f/0.0f - 1.0f/0.0f; -long double fin = 1.0f; -long double neg = -1.0f; -long double nn2; - -int isnanl(), isfinitel(), signbitl(); -void abort (void); -void exit (int); - -void pvalue (char *str, long double x) -{ -union - { - long double f; - unsigned int i[3]; - }u; -int k; - -printf("%s ", str); -u.f = x; -for (k = 0; k < 3; k++) - printf("%08x ", u.i[k]); -printf ("\n"); -} - - -int -main() -{ - -if (!isnanl(nnn)) - abort(); -pvalue("nnn", nnn); -pvalue("inf", inf); -nn2 = inf - inf; -pvalue("inf - inf", nn2); -if (isnanl(fin)) - abort(); -if (isnanl(inf)) - abort(); -if (!isfinitel(fin)) - abort(); -if (isfinitel(nnn)) - abort(); -if (isfinitel(inf)) - abort(); -if (!signbitl(neg)) - abort(); -if (signbitl(fin)) - abort(); -if (signbitl(inf)) - abort(); -/* -if (signbitf(nnn)) - abort(); - */ -exit (0); -return 0; -} |