Fix from HEAD.

This commit is contained in:
Dr. Stephen Henson 2005-05-12 23:13:40 +00:00
parent e1ff593dcb
commit c6012b252d

View File

@ -576,7 +576,7 @@ abs_val(LDOUBLE value)
} }
static LDOUBLE static LDOUBLE
pow10(int in_exp) pow_10(int in_exp)
{ {
LDOUBLE result = 1; LDOUBLE result = 1;
while (in_exp) { while (in_exp) {
@ -639,11 +639,11 @@ fmtfp(
/* we "cheat" by converting the fractional part to integer by /* we "cheat" by converting the fractional part to integer by
multiplying by a factor of 10 */ multiplying by a factor of 10 */
fracpart = roundv((pow10(max)) * (ufvalue - intpart)); fracpart = roundv((pow_10(max)) * (ufvalue - intpart));
if (fracpart >= (long)pow10(max)) { if (fracpart >= (long)pow_10(max)) {
intpart++; intpart++;
fracpart -= (long)pow10(max); fracpart -= (long)pow_10(max);
} }
/* convert integer part */ /* convert integer part */