diff options
author | Russ Cox <rsc@swtch.com> | 2007-12-07 15:29:19 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2007-12-07 15:29:19 -0500 |
commit | 6c6117397fb186253bd8754ecfd4786d1d1371f6 (patch) | |
tree | a6f1c990d39d8da40fba6681ac9013023d840786 /src/cmd | |
parent | 6d069877f08e1a71c3486ab6b38efb4ffba304cb (diff) | |
download | plan9port-6c6117397fb186253bd8754ecfd4786d1d1371f6.tar.gz plan9port-6c6117397fb186253bd8754ecfd4786d1d1371f6.tar.bz2 plan9port-6c6117397fb186253bd8754ecfd4786d1d1371f6.zip |
hoc: print exact floating point output
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/hoc/code.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 |