commit 5400bd239cbde2f545a5c61079c2b784af6fa6f2
parent e47d0a1e98d8a77f0196764d3f7e682715793e1d
Author: Russ Cox <russcox@gmail.com>
Date: Tue, 28 Jul 2009 16:43:23 -0400
lib9/fmt: fix printing of 1e308
pow10 was giving up too easily
http://codereview.appspot.com/96178
Diffstat:
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git 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];