lib9/fmt: fix printing of 1e308
pow10 was giving up too easily http://codereview.appspot.com/96178
This commit is contained in:
parent
e47d0a1e98
commit
5400bd239c
1 changed files with 1 additions and 4 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue