6#ifndef THEORETICA_COMPLEX_FUNCTIONS
7#define THEORETICA_COMPLEX_FUNCTIONS
66 return exp(p *
ln(z));
102 return (
exp(t) +
exp(-t)) / 2.0;
126 const T imag_sign = (z.
Im() < 0) ? T(-1.0) : T(1.0);
149 T real_part = (z.
Re() > 1.0) ? 1.0 : ((z.
Re() < -1.0) ? -1.0 : z.
Re());
165 const T real_part = (z.
Re() > 1.0) ? 1.0 : ((z. Re() < -1.0) ? -1.0 : z.
Re());
Complex number in algebraic form .
Definition complex.h:26
static constexpr complex i()
Imaginary unit.
Definition complex.h:336
Type a
Real part.
Definition complex.h:30
Type sqr_norm() const
Compute the square norm of the complex number.
Definition complex.h:128
Type Re() const
Get the real part of the complex number.
Definition complex.h:74
Type b
Imaginary part.
Definition complex.h:33
Type arg() const
Get the argument of the complex number.
Definition complex.h:173
Type norm() const
Compute the norm of the complex number.
Definition complex.h:134
Type Im() const
Get the imaginary part of the complex number.
Definition complex.h:98
Main namespace of the library which contains all functions and objects.
Definition algebra.h:27
dual2 sqrt(dual2 x)
Compute the square root of a second order dual number.
Definition dual2_functions.h:54
dual2 ln(dual2 x)
Compute the natural logarithm of a second order dual number.
Definition dual2_functions.h:195
dual2 abs(dual2 x)
Compute the absolute value of a second order dual number.
Definition dual2_functions.h:242
dual2 asin(dual2 x)
Compute the arcsine of a second order dual number.
Definition dual2_functions.h:248
double real
A real number, defined as a floating point type.
Definition constants.h:207
complex< T > identity(complex< T > z)
Complex identity.
Definition complex_analysis.h:19
dual2 exp(dual2 x)
Compute the exponential of a second order dual number.
Definition dual2_functions.h:138
complex< T > inverse(complex< T > z)
Compute the conjugate of a complex number.
Definition complex_analysis.h:35
constexpr real INVSQR2
The inverse of the square root of 2.
Definition constants.h:273
dual2 conjugate(dual2 x)
Return the conjugate of a second order dual number.
Definition dual2_functions.h:35
dual2 cos(dual2 x)
Compute the cosine of a second order dual number.
Definition dual2_functions.h:86
constexpr real MACH_EPSILON
Machine epsilon for the real type.
Definition constants.h:216
dual2 tan(dual2 x)
Compute the tangent of a second order dual number.
Definition dual2_functions.h:100
dual2 acos(dual2 x)
Compute the arcosine of a second order dual number.
Definition dual2_functions.h:267
complex< T > powf(complex< T > z, real p)
Compute a complex number raised to a real power.
Definition complex_analysis.h:65
dual2 sin(dual2 x)
Compute the sine of a second order dual number.
Definition dual2_functions.h:72
dual2 square(dual2 x)
Return the square of a second order dual number.
Definition dual2_functions.h:23
dual2 atan(dual2 x)
Compute the arctangent of a second order dual number.
Definition dual2_functions.h:286
dual2 cube(dual2 x)
Return the cube of a second order dual number.
Definition dual2_functions.h:29