thoc: print exact floating point output - plan9port - [fork] Plan 9 from user space (HTM) git clone git://src.adamsgaard.dk/plan9port (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 6c6117397fb186253bd8754ecfd4786d1d1371f6 (DIR) parent 6d069877f08e1a71c3486ab6b38efb4ffba304cb (HTM) Author: Russ Cox <rsc@swtch.com> Date: Fri, 7 Dec 2007 15:29:19 -0500 hoc: print exact floating point output Diffstat: M src/cmd/hoc/code.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- (DIR) diff --git a/src/cmd/hoc/code.c b/src/cmd/hoc/code.c t@@ -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; } t@@ -607,7 +607,7 @@ prexpr(void) /* print numeric value */ { Datum d; d = pop(); - print("%.12g ", d.val); + print("%.17g ", d.val); } void