Changeset 8c2815d in git for libpolys/coeffs/shortfl.cc


Ignore:
Timestamp:
Feb 25, 2013, 11:14:07 AM (10 years ago)
Author:
Yue Ren <ren@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'c987db42cd2ec943b97ac5746c99892ceddf909c')
Children:
26ebc69791aa463ad9adef87b7a8ee64433b8d6b
Parents:
2ad7541722e5fa0e6f54847c371628902a726b94
git-author:
Yue Ren <ren@mathematik.uni-kl.de>2013-02-25 11:14:07+01:00
git-committer:
Yue Ren <ren@mathematik.uni-kl.de>2013-02-25 11:18:38+01:00
Message:
fix: missing sign when converting number to float
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/shortfl.cc

    r2ad754 r8c2815d  
    449449    signed long int exp;
    450450    basis = mpf_get_d_2exp(&exp, e);
    451     float f = ldexp(basis,exp);
     451    float f= mpf_sgn(e)*ldexp(basis,exp);
    452452    mpf_clear(e);
    453453    return nf(f).N();
     
    475475  signed long int exp;
    476476  basis = mpf_get_d_2exp(&exp, q);
    477   float f = ldexp(basis,exp);
     477  float f = mpf_sgn(e)*ldexp(basis,exp);
    478478  mpf_clear(e);
    479479  mpf_clear(d);
Note: See TracChangeset for help on using the changeset viewer.