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


Ignore:
Timestamp:
Feb 25, 2013, 11:14:07 AM (11 years ago)
Author:
Yue Ren <ren@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38dfc5131670d387a89455159ed1e071997eec94')
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.