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/float/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/float/nantst.c')
-rw-r--r-- | libm/float/nantst.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/libm/float/nantst.c b/libm/float/nantst.c deleted file mode 100644 index 7edd992ae..000000000 --- a/libm/float/nantst.c +++ /dev/null @@ -1,54 +0,0 @@ -float inf = 1.0f/0.0f; -float nnn = 1.0f/0.0f - 1.0f/0.0f; -float fin = 1.0f; -float neg = -1.0f; -float nn2; - -int isnanf(), isfinitef(), signbitf(); - -void pvalue (char *str, float x) -{ -union - { - float f; - unsigned int i; - }u; - -printf("%s ", str); -u.f = x; -printf("%08x\n", u.i); -} - - -int -main() -{ - -if (!isnanf(nnn)) - abort(); -pvalue("nnn", nnn); -pvalue("inf", inf); -nn2 = inf - inf; -pvalue("inf - inf", nn2); -if (isnanf(fin)) - abort(); -if (isnanf(inf)) - abort(); -if (!isfinitef(fin)) - abort(); -if (isfinitef(nnn)) - abort(); -if (isfinitef(inf)) - abort(); -if (!signbitf(neg)) - abort(); -if (signbitf(fin)) - abort(); -if (signbitf(inf)) - abort(); -/* -if (signbitf(nnn)) - abort(); - */ -exit (0); -} |