uC-libc : round-off error in gcvt
From: checko (checko_at_gmail.com)
Date: 11/24/04
- Next message: yannouch: "Re: Help choosing hardware"
- Previous message: Oliver Fels: "Re: Difficulty accessing handhelds.org"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 23 Nov 2004 23:06:36 -0800
I fond a bug in gcvt.c, becase the round-off didn't add into the
integer part, when the number is 29.997 with digit 2 will be 29.00 .
and I found that just change one number:
k = f + 0.1/scale;
f2= f - k;
to
k = f + 0.5/scale;
f2= f - k;
this bug is corrected.
* there are 2 gcvt.c files, one is in libc/math, the other is in libm
- Next message: yannouch: "Re: Help choosing hardware"
- Previous message: Oliver Fels: "Re: Difficulty accessing handhelds.org"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|