This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/14471] Inaccurate y0f function on x86_32 and x86_64
- From: "liubov.dmitrieva at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Thu, 16 Aug 2012 08:16:33 +0000
- Subject: [Bug math/14471] Inaccurate y0f function on x86_32 and x86_64
- Auto-submitted: auto-generated
- References: <bug-14471-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14471
--- Comment #2 from Liubov Dmitrieva <liubov.dmitrieva at gmail dot com> 2012-08-16 08:16:33 UTC ---
>> represent the test argument using a hex float value
Updated test:
#include <stdio.h>
#include <math.h>
#include <fenv.h>
extern float y0f(float);
extern double y0(double);
int main() {
float a,r1;
double r2;
a=0x1.ab8e1ap3; //argument
fesetround(FE_TONEAREST); // FE_TONEAREST, FE_UPWARD, FE_DOWNWARD, and
FE_TOWARDZERO
r1 = y0f(a); //actual result
r2 = y0(a); //actual result 2
printf("inputs: a = %.6a\n", a);
printf("actual = %.6a\n", r1);
printf("expected = %.6a\n", r2);
printf("error = %f ulp\n", fabs(r1 - r2) * exp2(23.0-logbf(r1)));
return 0;
}
Result x86:
inputs: a = 0x1.ab8e1ap+3
actual = -0x1.0038a2p-22
expected = -0x1.ffef8fp-23
error = 8301.219724 ulp
Result x86_64:
inputs: a = 0x1.ab8e1ap+3
actual = -0x1.0010aap-22
expected = -0x1.ffef8fp-23
error = 3185.219724 ulp
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.