This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/14473] Inaccurate CPOW* function on all machines.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]