From 4dc2e78ce89a2ea430afefb4c3458b4e618c37f4 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Sun, 24 Jan 2016 21:41:35 -0500 Subject: [PATCH] Correct format specifier for float --- runtime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime.c b/runtime.c index 3ac7a4c8..fe2bce2d 100644 --- a/runtime.c +++ b/runtime.c @@ -557,7 +557,7 @@ object Cyc_display(object x, FILE *port) fprintf(port, "%d", ((integer_type *) x)->value); break; case double_tag: - fprintf(port, "%lf", ((double_type *) x)->value); + fprintf(port, "%f", ((double_type *) x)->value); break; case string_tag: fprintf(port, "%s", ((string_type *) x)->str); @@ -971,7 +971,7 @@ object Cyc_number2string(void *data, object cont, object n) { if (type_of(n) == integer_tag) { snprintf(buffer, 1024, "%d", ((integer_type *)n)->value); } else if (type_of(n) == double_tag) { - snprintf(buffer, 1024, "%lf", ((double_type *)n)->value); + snprintf(buffer, 1024, "%f", ((double_type *)n)->value); } else { Cyc_rt_raise2(data, "number->string - Unexpected object", n); }