From 5400bd239cbde2f545a5c61079c2b784af6fa6f2 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 28 Jul 2009 16:43:23 -0400 Subject: lib9/fmt: fix printing of 1e308 pow10 was giving up too easily http://codereview.appspot.com/96178 --- src/lib9/fmt/fltfmt.c | 5 +---- 1 file changed, 1 insertion(+), 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]; -- cgit v1.2.3