Path: blob/main/system/lib/libc/musl/include/complex.h
6174 views
#ifndef _COMPLEX_H1#define _COMPLEX_H23#ifdef __cplusplus4extern "C" {5#endif67#define complex _Complex8#ifdef __GNUC__9#define _Complex_I (__extension__ (0.0f+1.0fi))10#else11#define _Complex_I (0.0f+1.0fi)12#endif13#define I _Complex_I1415double complex cacos(double complex);16float complex cacosf(float complex);17long double complex cacosl(long double complex);1819double complex casin(double complex);20float complex casinf(float complex);21long double complex casinl(long double complex);2223double complex catan(double complex);24float complex catanf(float complex);25long double complex catanl(long double complex);2627double complex ccos(double complex);28float complex ccosf(float complex);29long double complex ccosl(long double complex);3031double complex csin(double complex);32float complex csinf(float complex);33long double complex csinl(long double complex);3435double complex ctan(double complex);36float complex ctanf(float complex);37long double complex ctanl(long double complex);3839double complex cacosh(double complex);40float complex cacoshf(float complex);41long double complex cacoshl(long double complex);4243double complex casinh(double complex);44float complex casinhf(float complex);45long double complex casinhl(long double complex);4647double complex catanh(double complex);48float complex catanhf(float complex);49long double complex catanhl(long double complex);5051double complex ccosh(double complex);52float complex ccoshf(float complex);53long double complex ccoshl(long double complex);5455double complex csinh(double complex);56float complex csinhf(float complex);57long double complex csinhl(long double complex);5859double complex ctanh(double complex);60float complex ctanhf(float complex);61long double complex ctanhl(long double complex);6263double complex cexp(double complex);64float complex cexpf(float complex);65long double complex cexpl(long double complex);6667double complex clog(double complex);68float complex clogf(float complex);69long double complex clogl(long double complex);7071double cabs(double complex);72float cabsf(float complex);73long double cabsl(long double complex);7475double complex cpow(double complex, double complex);76float complex cpowf(float complex, float complex);77long double complex cpowl(long double complex, long double complex);7879double complex csqrt(double complex);80float complex csqrtf(float complex);81long double complex csqrtl(long double complex);8283double carg(double complex);84float cargf(float complex);85long double cargl(long double complex);8687double cimag(double complex);88float cimagf(float complex);89long double cimagl(long double complex);9091double complex conj(double complex);92float complex conjf(float complex);93long double complex conjl(long double complex);9495double complex cproj(double complex);96float complex cprojf(float complex);97long double complex cprojl(long double complex);9899double creal(double complex);100float crealf(float complex);101long double creall(long double complex);102103#ifndef __cplusplus104#define __CIMAG(x, t) \105(+(union { _Complex t __z; t __xy[2]; }){(_Complex t)(x)}.__xy[1])106107#define creal(x) ((double)(x))108#define crealf(x) ((float)(x))109#define creall(x) ((long double)(x))110111#define cimag(x) __CIMAG(x, double)112#define cimagf(x) __CIMAG(x, float)113#define cimagl(x) __CIMAG(x, long double)114#endif115116#if __STDC_VERSION__ >= 201112L117#if defined(_Imaginary_I)118#define __CMPLX(x, y, t) ((t)(x) + _Imaginary_I*(t)(y))119#elif defined(__clang__)120#define __CMPLX(x, y, t) (+(_Complex t){ (t)(x), (t)(y) })121#else122#define __CMPLX(x, y, t) (__builtin_complex((t)(x), (t)(y)))123#endif124#define CMPLX(x, y) __CMPLX(x, y, double)125#define CMPLXF(x, y) __CMPLX(x, y, float)126#define CMPLXL(x, y) __CMPLX(x, y, long double)127#endif128129#ifdef __cplusplus130}131#endif132#endif133134135