• Paul Eggert's avatar
    Round bignums consistently with other integers · 0b36041d
    Paul Eggert authored
    * src/bignum.c (mpz_bufsize): New function.
    (bignum_bufsize): Use it.
    (mpz_get_d_rounded): New function.
    (bignum_to_double): Use it.
    * src/bignum.c (bignum_to_double):
    * src/data.c (bignum_arith_driver):
    When converting bignums to double, round instead of
    truncating, to be consistent with what happens with fixnums.
    * test/src/floatfns-tests.el (bignum-to-float): Test rounding.
    0b36041d
data.c 116 KB