diff options
| author | Charles Forsyth <charles.forsyth@gmail.com> | 2015-05-04 13:30:44 +0100 |
|---|---|---|
| committer | Charles Forsyth <charles.forsyth@gmail.com> | 2015-05-04 13:30:44 +0100 |
| commit | 19c1b9563e510e86f2b7b53748f60f8ac761e845 (patch) | |
| tree | 6b2953cb7ff559e6da427530f65bd7d11f147337 /libkern/nan-68000.c | |
| parent | 237716b91aa163971f7ebe09fbe2e2ea76880a1e (diff) | |
remove 68000 references
Diffstat (limited to 'libkern/nan-68000.c')
| -rw-r--r-- | libkern/nan-68000.c | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/libkern/nan-68000.c b/libkern/nan-68000.c deleted file mode 100644 index e1b3db36..00000000 --- a/libkern/nan-68000.c +++ /dev/null @@ -1,70 +0,0 @@ -#include <u.h> -#include <libc.h> - -#define NANEXP (2047<<20) -#define NANMASK (2047<<20) -#define NANSIGN (1<<31) - -double -NaN(void) -{ - union - { - double d; - long x[2]; - } a; - - a.x[0] = NANEXP; - a.x[1] = 1; - return a.d; -} - -int -isNaN(double d) -{ - union - { - double d; - long x[2]; - } a; - - a.d = d; - if((a.x[0] & NANMASK) != NANEXP) - return 0; - return !isInf(d, 0); -} - -double -Inf(int sign) -{ - union - { - double d; - long x[2]; - } a; - - a.x[0] = NANEXP; - a.x[1] = 0; - if(sign < 0) - a.x[0] |= NANSIGN; - return a.d; -} - -int -isInf(double d, int sign) -{ - union - { - double d; - long x[2]; - } a; - - a.d = d; - if(a.x[1] != 0) - return 0; - if(a.x[0] == NANEXP) - return sign >= 0; - if(a.x[0] == (NANEXP|NANSIGN)) - return sign <= 0; - return 0; -} |
