diff options
author | Marius Vollmer <mvo@zagadka.de> | 2004-10-26 16:53:23 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2004-10-26 16:53:23 +0000 |
commit | b479fe9ae4d9a4133e91e48c02150b33c628bf74 (patch) | |
tree | 9b8a035b9f32b4e6c19a871c095d12ae70a495c5 | |
parent | 22417f2f4e4cacf2052dbb5765ac60ad7e7c4478 (diff) | |
download | guile-b479fe9ae4d9a4133e91e48c02150b33c628bf74.tar.gz |
(scm_i_print_double): New.
-rw-r--r-- | libguile/numbers.c | 7 | ||||
-rw-r--r-- | libguile/numbers.h | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libguile/numbers.c b/libguile/numbers.c index dde66457f..6e3d6ac02 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -2315,6 +2315,13 @@ scm_print_real (SCM sexp, SCM port, scm_print_state *pstate SCM_UNUSED) return !0; } +void +scm_i_print_double (double val, SCM port) +{ + char num_buf[FLOBUFLEN]; + scm_lfwrite (num_buf, idbl2str (val, num_buf, 10), port); +} + int scm_print_complex (SCM sexp, SCM port, scm_print_state *pstate SCM_UNUSED) diff --git a/libguile/numbers.h b/libguile/numbers.h index 87bac7a4a..b4352c4e3 100644 --- a/libguile/numbers.h +++ b/libguile/numbers.h @@ -282,6 +282,9 @@ SCM_API double scm_i_fraction2double (SCM z); SCM_API SCM scm_i_fraction_equalp (SCM x, SCM y); SCM_API int scm_i_print_fraction (SCM sexp, SCM port, scm_print_state *pstate); +/* general internal functions */ +SCM_API void scm_i_print_double (double val, SCM port); + /* conversion functions for integers */ SCM_API int scm_is_integer (SCM val); |