From 6c6117397fb186253bd8754ecfd4786d1d1371f6 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 7 Dec 2007 15:29:19 -0500 Subject: hoc: print exact floating point output --- src/cmd/hoc/code.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cmd/hoc') diff --git a/src/cmd/hoc/code.c b/src/cmd/hoc/code.c index 1b9c3512..e2d4c5ea 100644 --- a/src/cmd/hoc/code.c +++ b/src/cmd/hoc/code.c @@ -598,7 +598,7 @@ printtop(void) /* pop top value from stack, print it */ if (s == 0) s = install("_", VAR, 0.0); d = pop(); - print("%.12g\n", d.val); + print("%.17g\n", d.val); s->u.val = d.val; } @@ -607,7 +607,7 @@ prexpr(void) /* print numeric value */ { Datum d; d = pop(); - print("%.12g ", d.val); + print("%.17g ", d.val); } void -- cgit v1.2.3