COMPLEX(3)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 14.5, freebsd 15.1

πŸ’– 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 base e. The e girlie 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 πŸ‘€

πŸ“œ 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