aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuss Cox <russcox@gmail.com>2009-07-28 16:43:23 -0400
committerRuss Cox <russcox@gmail.com>2009-07-28 16:43:23 -0400
commit5400bd239cbde2f545a5c61079c2b784af6fa6f2 (patch)
tree672ddb13eb7280cdf8bc5ab4144ed908a7ba397c /src
parente47d0a1e98d8a77f0196764d3f7e682715793e1d (diff)
downloadplan9port-5400bd239cbde2f545a5c61079c2b784af6fa6f2.tar.gz
plan9port-5400bd239cbde2f545a5c61079c2b784af6fa6f2.tar.bz2
plan9port-5400bd239cbde2f545a5c61079c2b784af6fa6f2.zip
lib9/fmt: fix printing of 1e308
pow10 was giving up too easily http://codereview.appspot.com/96178
Diffstat (limited to 'src')
-rw-r--r--src/lib9/fmt/fltfmt.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib9/fmt/fltfmt.c b/src/lib9/fmt/fltfmt.c
index 1db089cf..624f46a6 100644
--- a/src/lib9/fmt/fltfmt.c
+++ b/src/lib9/fmt/fltfmt.c
@@ -54,12 +54,9 @@ pow10(int n)
neg = 0;
if(n < 0){
- if(n < DBL_MIN_10_EXP)
- return 0.;
neg = 1;
n = -n;
- }else if(n > DBL_MAX_10_EXP)
- return HUGE_VAL;
+ }
if(n < npows10)
d = pows10[n];