plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 6c6117397fb186253bd8754ecfd4786d1d1371f6
parent 6d069877f08e1a71c3486ab6b38efb4ffba304cb
Author: Russ Cox <rsc@swtch.com>
Date:   Fri,  7 Dec 2007 15:29:19 -0500

hoc: print exact floating point output

Diffstat:
Msrc/cmd/hoc/code.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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