Use scientific notation only if there are enough trailing zeroes.
authorMark H Weaver <mhw@netris.org>
Tue, 19 Mar 2013 07:25:59 +0000 (03:25 -0400)
committerMark H Weaver <mhw@netris.org>
Tue, 19 Mar 2013 07:38:15 +0000 (03:38 -0400)
commit8150dfa1f2f84d151ced5f723dc69ce0cae1cd32
tree477ae2d067c5327f531aa3fd3ccf4251f137fcc6
parenta9ea4f909b9970c755b0a7c4cd9da907e66496fc
Use scientific notation only if there are enough trailing zeroes.

* libguile/numbers.c (idbl2str): Print large numbers in scientific
  notation only if the exponent is >= 7 and the least significant
  non-zero digit has value >= radix^4.

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