aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128/ldbl2mpn.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-07-11 05:55:13 +0000
committerUlrich Drepper <drepper@redhat.com>2002-07-11 05:55:13 +0000
commit52e1b618f4a5a161b16d2d14bac74b685097eccb (patch)
treeee54c7b3bb82af193136c11f4e121f582f3737ed /sysdeps/ieee754/ldbl-128/ldbl2mpn.c
parentb664d723de1de150fbfec3df9828fe5f0cf0b5ce (diff)
downloadglibc-52e1b618f4a5a161b16d2d14bac74b685097eccb.tar
glibc-52e1b618f4a5a161b16d2d14bac74b685097eccb.tar.gz
glibc-52e1b618f4a5a161b16d2d14bac74b685097eccb.tar.bz2
glibc-52e1b618f4a5a161b16d2d14bac74b685097eccb.zip
Update.
2002-07-03 Jakub Jelinek <jakub@redhat.com> * stdio-common/printf_fp.c (__printf_fp.c): If _FPIO_CONST_SHIFT is non-zero, adjust exponent. * sysdeps/ieee754/ldbl-128/s_erfl.c (__erfl, erfl, __erfcl, erfcl): Remove NO_LONG_DOUBLE aliases. * sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l, expm1l): Likewise. * sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl, log1pl): Likewise. (__log1pl): Raise divide by zero and invalid exceptions when needed. * sysdeps/ieee754/ldbl-128/e_powl.c (__ieee754_powl): Special case 1**y and -1**+-Inf. * sysdeps/ieee754/ldbl-128/ldbl2mpn.c (__mpn_extract_long_double): Fix BITS_PER_MP_LIMB 32 extraction. * sysdeps/ieee754/ldbl-128/e_log2l.c (__ieee754_log2l): Don't raise exceptions for qNaNs. * sysdeps/ieee754/ldbl-128/e_log10l.c (__ieee754_log10l): Likewise. * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgamma_r): Raise exceptions when needed. Don't recurse unnecessarily. Special case 1.0L and 2.0L arguments to avoid -0.0L as result. * sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee754_y0l): Don't raise exceptions for qNaNs. * sysdeps/ieee754/ldbl-128/s_remquol.c (__remquol): Make qs 64-bit to fix *quo return value sign. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (__ieee754_gamma_r): Special case -Inf argument. * soft-fp/op-4.h (_FP_FRAC_CLZ_4): Fix a pasto. 2002-07-01 Jakub Jelinek <jakub@redhat.com> * libio/tst-eof.c (do_test): Remove unused ch and tm variables. * iconvdata/iso-2022-jp-3.c (EMIT_SHIFT_TO_INIT): Kill warnings if -DNDEBUG.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/ldbl2mpn.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/ldbl2mpn.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sysdeps/ieee754/ldbl-128/ldbl2mpn.c b/sysdeps/ieee754/ldbl-128/ldbl2mpn.c
index 08a4c37a51..cdd09db69f 100644
--- a/sysdeps/ieee754/ldbl-128/ldbl2mpn.c
+++ b/sysdeps/ieee754/ldbl-128/ldbl2mpn.c
@@ -102,7 +102,7 @@ __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
#else
int j, k, l;
- for (j = N - 1; j > 0; j++)
+ for (j = N - 1; j > 0; j--)
if (res_ptr[j] != 0)
break;
@@ -112,20 +112,22 @@ __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
if (cnt < 0)
{
cnt += BITS_PER_MP_LIMB;
- l++;
+ l--;
}
if (!cnt)
for (k = N - 1; k >= l; k--)
res_ptr[k] = res_ptr[k-l];
else
- for (k = N - 1; k >= l; k--)
- res_ptr[k] = res_ptr[k-l] << cnt
- | res_ptr[k-l-1] >> (BITS_PER_MP_LIMB - cnt);
- res_ptr[k--] = res_ptr[0] << cnt;
+ {
+ for (k = N - 1; k > l; k--)
+ res_ptr[k] = res_ptr[k-l] << cnt
+ | res_ptr[k-l-1] >> (BITS_PER_MP_LIMB - cnt);
+ res_ptr[k--] = res_ptr[0] << cnt;
+ }
for (; k >= 0; k--)
res_ptr[k] = 0;
- *expt = LDBL_MIN_EXP - 1 - 3 * BITS_PER_MP_LIMB - cnt;
+ *expt = LDBL_MIN_EXP - 1 - l * BITS_PER_MP_LIMB - cnt;
#endif
}
}