1 /** 2 * D header file for C99. 3 * 4 * $(C_HEADER_DESCRIPTION pubs.opengroup.org/onlinepubs/009695399/basedefs/_complex.h.html, _complex.h) 5 * 6 * Copyright: Copyright Sean Kelly 2005 - 2009. 7 * License: Distributed under the 8 * $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0). 9 * (See accompanying file LICENSE) 10 * Authors: Sean Kelly 11 * Source: $(DRUNTIMESRC core/stdc/_complex.d) 12 * Standards: ISO/IEC 9899:1999 (E) 13 */ 14 15 module core.stdc.complex; 16 17 extern (C): 18 @trusted: // All of these operate on floating point values only. 19 nothrow: 20 @nogc: 21 22 // @@@DEPRECATED_2.105@@@ 23 deprecated: 24 alias creal complex; 25 alias ireal imaginary; 26 cdouble cacos(cdouble z); 27 cfloat cacosf(cfloat z); 28 creal cacosl(creal z); 29 30 cdouble casin(cdouble z); 31 cfloat casinf(cfloat z); 32 creal casinl(creal z); 33 34 cdouble catan(cdouble z); 35 cfloat catanf(cfloat z); 36 creal catanl(creal z); 37 38 cdouble ccos(cdouble z); 39 cfloat ccosf(cfloat z); 40 creal ccosl(creal z); 41 42 cdouble csin(cdouble z); 43 cfloat csinf(cfloat z); 44 creal csinl(creal z); 45 46 cdouble ctan(cdouble z); 47 cfloat ctanf(cfloat z); 48 creal ctanl(creal z); 49 50 cdouble cacosh(cdouble z); 51 cfloat cacoshf(cfloat z); 52 creal cacoshl(creal z); 53 54 cdouble casinh(cdouble z); 55 cfloat casinhf(cfloat z); 56 creal casinhl(creal z); 57 58 cdouble catanh(cdouble z); 59 cfloat catanhf(cfloat z); 60 creal catanhl(creal z); 61 62 cdouble ccosh(cdouble z); 63 cfloat ccoshf(cfloat z); 64 creal ccoshl(creal z); 65 66 cdouble csinh(cdouble z); 67 cfloat csinhf(cfloat z); 68 creal csinhl(creal z); 69 70 cdouble ctanh(cdouble z); 71 cfloat ctanhf(cfloat z); 72 creal ctanhl(creal z); 73 74 cdouble cexp(cdouble z); 75 cfloat cexpf(cfloat z); 76 creal cexpl(creal z); 77 78 cdouble clog(cdouble z); 79 cfloat clogf(cfloat z); 80 creal clogl(creal z); 81 82 double cabs(cdouble z); 83 float cabsf(cfloat z); 84 real cabsl(creal z); 85 86 cdouble cpow(cdouble x, cdouble y); 87 cfloat cpowf(cfloat x, cfloat y); 88 creal cpowl(creal x, creal y); 89 90 cdouble csqrt(cdouble z); 91 cfloat csqrtf(cfloat z); 92 creal csqrtl(creal z); 93 94 double carg(cdouble z); 95 float cargf(cfloat z); 96 real cargl(creal z); 97 98 pragma(inline, true) double cimag(cdouble z) { return z.im; } 99 pragma(inline, true) float cimagf(cfloat z) { return z.im; } 100 pragma(inline, true) real cimagl(creal z) { return z.im; } 101 102 cdouble conj(cdouble z); 103 cfloat conjf(cfloat z); 104 creal conjl(creal z); 105 106 cdouble cproj(cdouble z); 107 cfloat cprojf(cfloat z); 108 creal cprojl(creal z); 109 110 // Note: `creal` is a keyword in D and so this function is inaccessible, use `creald` instead 111 //pragma(inline, true) double creal(cdouble z) { return z.re; } 112 113 pragma(inline, true) double creald(cdouble z) { return z.re; } 114 pragma(inline, true) float crealf(cfloat z) { return z.re; } 115 pragma(inline, true) real creall(creal z) { return z.re; }