Simplify and improve scm_i_big2dbl, and add scm_i_big2dbl_2exp
authorMark H Weaver <mhw@netris.org>
Sun, 3 Mar 2013 09:58:55 +0000 (04:58 -0500)
committerMark H Weaver <mhw@netris.org>
Tue, 12 Mar 2013 19:39:25 +0000 (15:39 -0400)
commit1eb6a33a30ea27f97fc401a25a3014e10e3c6f98
treef0facfa4d2fd29f403064ed70842e907ad2ef908
parente08a12b5356c20ed0418bcaee136eb3632c5616f
Simplify and improve scm_i_big2dbl, and add scm_i_big2dbl_2exp

* libguile/numbers.c (scm_i_big2dbl_2exp): New static function.
  (scm_i_big2dbl): Reimplement in terms of 'scm_i_big2dbl_2exp',
  with proper rounding.

* test-suite/tests/numbers.test ("exact->inexact"): Add tests.
libguile/numbers.c
test-suite/tests/numbers.test