From: ceriel Date: Mon, 18 Dec 1989 18:17:17 +0000 (+0000) Subject: flt_status maintained for flt_str2flt() X-Git-Tag: release-5-5~1989 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=662c87a5791645b2ae6432ce5b42931b72491cc3;p=ack.git flt_status maintained for flt_str2flt() --- diff --git a/modules/src/flt_arith/flt_str2fl.c b/modules/src/flt_arith/flt_str2fl.c index 297432149..eeafce8e1 100644 --- a/modules/src/flt_arith/flt_str2fl.c +++ b/modules/src/flt_arith/flt_str2fl.c @@ -200,16 +200,20 @@ add_exponent(e, exp) int neg = exp < 0; int divsz, modsz; flt_arith x; + int status; if (neg) exp = -exp; divsz = exp / SMALLSZ; modsz = exp % SMALLSZ; flt_mul(e, (neg ? r_10pow : s10pow) + modsz, &x); + if (flt_status) status = flt_status; while (divsz >= BIGSZ) { flt_mul(&x, neg ? &r_big_10pow[BIGSZ-1] : &big_10pow[BIGSZ-1],&x); + if (flt_status) status = flt_status; divsz -= BIGSZ-1; } flt_mul(&x, (neg ? r_big_10pow : big_10pow) + divsz, e); + if (flt_status) status = flt_status; } flt_str2flt(s, e)