COMPLEX(3)
π COMPLEX(3) β Library Functions Manual π
okay so bestie, welcome to the Library Functions Manual entry for complex(3) β yes, the complex arithmetic one β and we're making it cute. β¨ This is all about complex arithmetic in the C math library, and honestly? Iconic.
πΈ NAME πΈ
complex β complex arithmetic. That's the whole vibe. π
π LIBRARY π
Math Library (libm, -lm) β that's where these live. π«Ά
β¨ SYNOPSIS β¨
#include <complex.h>
π DESCRIPTION π
These functions support complex arithmetic in the C math library. Basically <complex.h> is the friend group, and these functions are the main characters. No cap. π¦
π LIST OF FUNCTIONS π
okay so here's the tea: each function below is the double complex version. Every single one has a float complex counterpart with an f appended to the name, plus a long double complex counterpart with an l appended. Example time, bestie: the float and long double twins of double cabs(double complex z) are float cabsf(float complex z) and long double cabsl(long double complex z), respectively. Slay. π
π Absolute-value Functions π
cabsβ complex absolute value (i.e., norm, modulus, magnitude). It's giving "how big is this complex number" energy. πcsqrtβ complex square root. Square root, but make it complex. π
π₯ Exponential Function π₯
cexpβ exponential basee. Theegirlie of the group. β¨
πΏ Natural logarithm Function πΏ
clogβ natural logarithm. Log but natural, iykyk. π¦
π Manipulation Functions π
cargβ compute the argument (i.e., phase angle). Phase-angle realness. πcimagβ compute the imaginary part. The imaginary bestie. πconjβ compute the complex conjugate. Conjugate slay. πcprojβ compute projection onto Riemann sphere. Riemann sphere moment. πcrealβ compute the real part. The real one, literally. β
π§ Trigonometric and Hyperbolic Functions π§
cacosβ arc cosine. πΈcacoshβ arc hyperbolic cosine. πcasinβ arc sine. π¦casinhβ arc hyperbolic sine. β¨catanβ arc tangent. πcatanhβ arc hyperbolic tangent. πccosβ cosine. πccoshβ hyperbolic cosine. π₯cpowβ power function. π₯csinβ sine. πcsinhβ hyperbolic sine. βctanβ tangent. πctanhβ hyperbolic tangent. π
π SEE ALSO π
fenv(3)ieee(3)math(3)tgmath(3)ISO/IEC 9899:TC3,http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf.β yes, the whole URL, bestie. π
π STANDARDS π
The <complex.h> functions described here conform to ISO/IEC 9899:1999 (βISO C99β). Standards girlie behavior. β
π BUGS π
The power functions, cpowf,(cpow), and cpowl(), are implemented, but the code was neither reviewed nor tested.
So like... it exists, but nobody reviewed it and nobody tested it. Proceed with caution, bestie. π
xoxo, this page is from Debian and dated November 3, 2021 β COMPLEX(3) out, mwah ππ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2011 Murray Stokely <murray@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms