Using %g format for printing floating point numbers.

This commit is contained in:
Stefano Sanfilippo 2015-03-08 12:34:51 +01:00
parent 519a7f7510
commit 9d2413857d

View File

@ -39,11 +39,11 @@ void __Monicelli_putInt(__Monicelli_Int value) {
} }
void __Monicelli_putFloat(__Monicelli_Float value) { void __Monicelli_putFloat(__Monicelli_Float value) {
printf("%f\n", value); printf("%g\n", value);
} }
void __Monicelli_putDouble(__Monicelli_Double value) { void __Monicelli_putDouble(__Monicelli_Double value) {
printf("%lf\n", value); printf("%lg\n", value);
} }
__Monicelli_Bool __Monicelli_getBool() { __Monicelli_Bool __Monicelli_getBool() {