From 38b3f1fea8fe4f2c590c1a9438d219291a7bfcd2 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 10 Apr 2012 23:41:54 -0400 Subject: fix float scanning of certain values ending in zeros for example, "1000000000" was being read as "1" due to this loop exiting early. it's necessary to actually update z and zero the entries so that the subsequent rounding code does not get confused; before i did that, spurious inexact exceptions were being raised. --- src/internal/floatscan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/internal/floatscan.c') diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c index ed735278..000706d7 100644 --- a/src/internal/floatscan.c +++ b/src/internal/floatscan.c @@ -225,8 +225,10 @@ static long double decfloat(FILE *f, int bits, int emin, int sign, int pok) } } - for (y=i=0; i