diff options
author | Russ Cox <russcox@gmail.com> | 2009-07-28 16:43:23 -0400 |
---|---|---|
committer | Russ Cox <russcox@gmail.com> | 2009-07-28 16:43:23 -0400 |
commit | 5400bd239cbde2f545a5c61079c2b784af6fa6f2 (patch) | |
tree | 672ddb13eb7280cdf8bc5ab4144ed908a7ba397c | |
parent | e47d0a1e98d8a77f0196764d3f7e682715793e1d (diff) | |
download | plan9port-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
-rw-r--r-- | src/lib9/fmt/fltfmt.c | 5 |
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]; |