diff options
Diffstat (limited to 'lib/libc/gdtoa/ulp.c')
-rw-r--r-- | lib/libc/gdtoa/ulp.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/libc/gdtoa/ulp.c b/lib/libc/gdtoa/ulp.c index 7810a5c8e64..17e9f862c44 100644 --- a/lib/libc/gdtoa/ulp.c +++ b/lib/libc/gdtoa/ulp.c @@ -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); } |