summaryrefslogtreecommitdiff
path: root/val.c
diff options
context:
space:
mode:
Diffstat (limited to 'val.c')
-rw-r--r--val.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/val.c b/val.c
index 18d0ffa..8e351ff 100644
--- a/val.c
+++ b/val.c
@@ -54,7 +54,7 @@ void print_val(Val v) {
printf("nil");
break;
case TY_NUM:
- printf("%f",AS_NUM(v));
+ printf("%g",AS_NUM(v));
break;
case TY_BOOL:
printf("%s",AS_BOOL(v) ? "true" : "false");