diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 1999-08-31 08:46:21 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 1999-08-31 08:46:21 +0000 |
commit | 4f17bb8af197864b6ae549790ab6c7716620b454 (patch) | |
tree | 761ec8252f96e03912feeb21b0614ba7d71040f5 /set_z.c | |
parent | 5d755bacaa0c16f5006c55adcef6235acd3d5719 (diff) | |
download | mpfr-4f17bb8af197864b6ae549790ab6c7716620b454.tar.gz |
added ABS for SIZ(z) when z<0
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@368 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'set_z.c')
-rw-r--r-- | set_z.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -38,9 +38,10 @@ mpfr_set_z (f, z, rnd) int fn, zn, k, dif, sign_z, sh; mp_limb_t *fp = MANT(f), *zp, cc, c2; sign_z = mpz_cmp_ui(z,0); +printf("sign=%d\n", sign_z); if (sign_z==0) return (SIZE(f)=0); fn = 1 + (PREC(f)-1)/BITS_PER_MP_LIMB; - zn = SIZ(z); + zn = ABS(SIZ(z)); dif = zn-fn; zp = PTR(z); count_leading_zeros(k, zp[zn-1]); |