add creal/cimag macros in complex.h (and use them in the functions defs)
This commit is contained in:
parent
132f0a0083
commit
13e400b355
8 changed files with 20 additions and 20 deletions
|
|
@ -2,6 +2,5 @@
|
|||
|
||||
double (cimag)(double complex z)
|
||||
{
|
||||
union dcomplex u = {z};
|
||||
return u.a[1];
|
||||
return cimag(z);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,5 @@
|
|||
|
||||
float (cimagf)(float complex z)
|
||||
{
|
||||
union fcomplex u = {z};
|
||||
return u.a[1];
|
||||
return cimagf(z);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,5 @@
|
|||
|
||||
long double (cimagl)(long double complex z)
|
||||
{
|
||||
union lcomplex u = {z};
|
||||
return u.a[1];
|
||||
return cimagl(z);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include <complex.h>
|
||||
|
||||
double creal(double complex z)
|
||||
double (creal)(double complex z)
|
||||
{
|
||||
return z;
|
||||
return creal(z);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include <complex.h>
|
||||
|
||||
float crealf(float complex z)
|
||||
float (crealf)(float complex z)
|
||||
{
|
||||
return z;
|
||||
return crealf(z);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include <complex.h>
|
||||
|
||||
long double creall(long double complex z)
|
||||
long double (creall)(long double complex z)
|
||||
{
|
||||
return z;
|
||||
return creall(z);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue