Skip to main content

Module math

Module math 

Source
Expand description

Math kernels for Complex.

Implements the Specialized*Math traits. Complex vectors thereby get CoreMath, TranscendentalMath and SpatialMath (with their _p policy forms) from the blanket impls in thermite::math, plus SpecializedComplexMath for the operations over the real part.

Each kernel evaluates its complex function through the inner vector’s policy math (sin_cos_p, exp_p, atan2_p, …), carrying the caller’s policy all the way down. Anything expressible by composition (sin, cos, tan_pi, powi, sqrt1pm1, compound, …) comes from the trait defaults, which are already correct over C.

RealMath is not implemented; see the note at the bottom of this file.

Modules§

specialspecial
Special functions for Complex (special feature).
specialized
The complex math trait family.

Traits§

ComplexMath
Complex math functions using the default policy. Operations whose result is real (modulus, argument, polar form) or whose argument is (a real power, base, or logarithm base), which the Self -> Self core families cannot express.
ComplexMathWithPolicy
Complex math functions with customizable policies. Operations whose result is real (modulus, argument, polar form) or whose argument is (a real power, base, or logarithm base), which the Self -> Self core families cannot express.