From 9d2413857d16ba6941e0d52090c3fcf324bd333a Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Sun, 8 Mar 2015 12:34:51 +0100 Subject: [PATCH] Using %g format for printing floating point numbers. --- Runtime.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime.cpp b/Runtime.cpp index 1c5c944..ff9e769 100644 --- a/Runtime.cpp +++ b/Runtime.cpp @@ -39,11 +39,11 @@ void __Monicelli_putInt(__Monicelli_Int value) { } void __Monicelli_putFloat(__Monicelli_Float value) { - printf("%f\n", value); + printf("%g\n", value); } void __Monicelli_putDouble(__Monicelli_Double value) { - printf("%lf\n", value); + printf("%lg\n", value); } __Monicelli_Bool __Monicelli_getBool() {