diff options
author | David Schultz <das@FreeBSD.org> | 2011-03-09 06:14:33 +0000 |
---|---|---|
committer | David Schultz <das@FreeBSD.org> | 2011-03-09 06:14:33 +0000 |
commit | 21a2b1c905e6a3ae73e3ca075627e81a2ccac58f (patch) | |
tree | 80228e2b243573cbd695c52e7a912cc1643cd1b2 /ulp.c | |
parent | 9ea4d2a87415d5928272c15f22583103f2ccfe30 (diff) |
Notes
Diffstat (limited to 'ulp.c')
-rw-r--r-- | ulp.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -34,13 +34,13 @@ THIS SOFTWARE. double ulp #ifdef KR_headers - (x) double x; + (x) U *x; #else - (double x) + (U *x) #endif { Long L; - double a; + U a; L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1; #ifndef Sudden_Underflow @@ -49,22 +49,22 @@ ulp #ifdef IBM L |= Exp_msk1 >> 4; #endif - word0(a) = L; - word1(a) = 0; + word0(&a) = L; + word1(&a) = 0; #ifndef Sudden_Underflow } else { L = -L >> Exp_shift; if (L < Exp_shift) { - word0(a) = 0x80000 >> L; - word1(a) = 0; + word0(&a) = 0x80000 >> L; + word1(&a) = 0; } else { - word0(a) = 0; + word0(&a) = 0; L -= Exp_shift; - word1(a) = L >= 31 ? 1 : 1 << 31 - L; + word1(&a) = L >= 31 ? 1 : 1 << (31 - L); } } #endif - return a; + return dval(&a); } |