carg, cimag, creal,.. in tgmath.h

Andreas Jaeger aj@suse.de
Sun Jun 15 19:00:00 GMT 2003


Ulrich Drepper <drepper@redhat.com> writes:

> Andreas Jaeger wrote:
>
>> Here's a patch to fix the c* functions.  Ok to commit?
>
> What exactly is wrong.  And cite the standard.

From 7.22:
       [#6] For each unsuffixed function in <complex.h> that is not
       a c-prefixed counterpart to  a  function  in  <math.h>,  the
       corresponding  type-generic  macro  has the same name as the
       function.  These type-generic macros are:

            carg          conj          creal
            cimag         cproj

       Use of the macro with any real or complex argument invokes a
       complex function.

The problem is that carg(real float variable) will call the long
double function.

Andreas
-- 
 Andreas Jaeger, SuSE Linux AG, aj@suse.de, http://www.suse.de/~aj
  GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-hacker/attachments/20030615/ab41c760/attachment.sig>


More information about the Libc-hacker mailing list