This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/14473] Inaccurate CPOW* function on all machines.
- From: "mwelinder at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 06 Dec 2013 14:17:38 +0000
- Subject: [Bug math/14473] Inaccurate CPOW* function on all machines.
- Auto-submitted: auto-generated
- References: <bug-14473-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=14473
--- Comment #6 from M Welinder <mwelinder at gmail dot com> ---
Ok, make that three classes of inaccuracy:
(3) Bad handling of real arguments. I see different values in this
case:
z1 = dont_optimize + 607/128;
z2 = 1234567 / 8192;
z = cpow (z1, z2);
printf ("%.20g + %g i\n", creal (z), cimag (z));
printf ("%.20g\n", pow (creal (z1), creal (z2)));
I get:
2.0370359763344673153e+90 + 0 i
2.0370359763344860863e+90
For real arguments cpow should defer to pow. (Or at least use a method
that is no less accurate than pow; I think the current evidence is that
pow is better.)
--
You are receiving this mail because:
You are on the CC list for the bug.