lib9/fmt: fix printing of 1e308

pow10 was giving up too easily

http://codereview.appspot.com/96178
This commit is contained in:
Russ Cox 2009-07-28 16:43:23 -04:00
parent e47d0a1e98
commit 5400bd239c

View file

@ -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];