mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 23:13:34 +00:00
22 lines
510 B
C
22 lines
510 B
C
#ifndef _COMPLEX_IMPL_H
|
|
#define _COMPLEX_IMPL_H
|
|
|
|
#include <libc/tinymath/complex.h>
|
|
#include "libc/math.h"
|
|
|
|
#undef __CMPLX
|
|
#undef CMPLX
|
|
#undef CMPLXF
|
|
#undef CMPLXL
|
|
|
|
#define __CMPLX(x, y, t) \
|
|
((union { _Complex t __z; t __xy[2]; }){.__xy = {(x),(y)}}.__z)
|
|
|
|
#define CMPLX(x, y) __CMPLX(x, y, double)
|
|
#define CMPLXF(x, y) __CMPLX(x, y, float)
|
|
#define CMPLXL(x, y) __CMPLX(x, y, long double)
|
|
|
|
hidden double complex __ldexp_cexp(double complex,int);
|
|
hidden float complex __ldexp_cexpf(float complex,int);
|
|
|
|
#endif
|