Math Vector Library
Programming Reference Manual C/C++
Version 1.0 DD-00002-010

Math Vector Library
Reference Manual (C/C++)
DD-00002-010

Jan Adelsbach

January 26, 2024
Contents
1 About this Guide
1.1 Legal Information
1.2 Feedback and Contact
1.3 Introduction
1.4 Audience for This Guide
1.5 How to Use This Guide
1.6 Conventions Used in This Guide
2 Overview
2.1 Introduction
2.2 Thread Safety
2.3 SIMD/SPMD Unit Usage
2.4 Performance Characteristics
3 Utility
3.1 mvecver - Version query
4 Rounding
4.1 vfloor - Vector round down
4.2 vceil - Vector round up
4.3 vtrunc - Vector truncate
4.4 vround - Vector rounding
5 Roots
5.1 vsqrt - Vector square root ⎷ --
  x
5.2 vrsqrt - Vector reciprocal square root  ⎷ --
1/ x
5.3 vcbrt - Vector cube root ⎷3--
  x
5.4 vrcbrt - Vector reciprocal cube root  ⎷3--
1/ x
6 Trigonometric Functions
6.1 vsin - Vector sine sin(x)
6.2 vcos - Vector cosine cos(x)
6.3 vtan - Vector tangent tan(x)
6.4 vasin - Vector arcsine   -1
sin  (x)
6.5 vacos - Vector arccosine   -1
cos  (x)
6.6 vatan - Vector arctangent    -1
tan (x)
6.7 vatan2 - Vector arctangent    -1
tan (x/y)
6.8 vsind - Vector sine sin(x)  (degrees)
6.9 vcosd - Vector cosine cos(x)  (degrees)
6.10 vtand - Vector tangent tan(x)  (degrees)
6.11 vasind - Vector arcsine   -1
sin  (x)  (degrees)
6.12 vacosd - Vector arccosine   -1
cos  (x)  (degrees)
6.13 vatand - Vector arctangent    -1
tan (x)  (degrees)
6.14 vsinpi - Vector sine sin(πx)
6.15 vcospi - Vector cosine cos(πx)
6.16 vtanpi - Vector tangent tan(πx)
6.17 vasinpi - Vector arcsine   -1
sin  (x)/π
6.18 vacospi - Vector arccosine   -1
cos  (x)/π
6.19 vatanpi - Vector arctangent    -1
tan (x)/π
7 Hypergeometric Functions
7.1 vsinh - Vector hypergeometric sine sinh(x)
7.2 vcosh - Vector hypergeometric cosine cosh(x)
7.3 vtanh - Vector hypergeometric tangent tanh(x)
7.4 vasinh - Vector hypergeometric arcsine     -1
sinh  (x)
7.5 vacosh - Vector hypergeometric arccosine    -1
cosh  (x)
7.6 vatanh - Vector hypergeometric arctangent     -1
tanh  (x)
8 Exponentials and Logarithms
8.1 vexp - Vector exponential  x
e
8.2 vexpm1 - Vector exponential  x
e -1
8.3 vexp2 - Vector binary exponential  x
2
8.4 vlog - Vector logarithm log(x)
8.5 vlog2 - Vector binary logarithm log2(x)
8.6 vlog10 - Vector base-10 logarithm log10(x)
8.7 vlog1p - Vector logarithm log(x+ 1)
8.8 vpow - Vector power  y
x
8.9 vpows - Vector power scalar exponent y
x
8.10 vmod - Vector modulus mod(x,y)
9 Special Functions
9.1 verf - Vector error function erf(x)
9.2 verfc - Vector complementary error function erfc(x)
9.3 vbesj0 - Vector Bessel Function J0(x)
9.4 vbesy0 - Vector Bessel Function Y0(x)
9.5 vbesj1 - Vector Bessel Function J1(x)
9.6 vbesy1 - Vector Bessel Function Y1(x)
9.7 vbesjn - Vector Bessel Function Jn(x)
9.8 vbesyn - Vector Bessel Function Yn(x)
9.9 vlgamma - Vector Log-Gamma logΓ (x)
10 Other Functions
10.1 vabs - Vector absolute value |x|
10.2 vhypot - Vector euclidean distance √︁ -2--2-
  x +y
10.3 vrem - Vector remainder
11 Arithmetic Functions
11.1 vadd - Vector addition x+y
11.2 vsadd - Vector scalar addition x+ α
11.3 vsub - Vector subtraction x-y
11.4 vssub - Vector scalar subtraction x-α
11.5 vmul - Vector multiplication xy
11.6 vsmul - Vector scalar multiplication αx
11.7 vdiv - Vector division x/y
11.8 vsdiv - Vector scalar division x/α
11.9 vrecp - Vector reciprocal 1/x
12 Complex Numbers
12.1 vcreal - Vector complex real compoment Re(x)
12.2 vcimag - Vector complex imaginary compoment Im(x)
12.3 vcabs - Vector complex absolute value |x|
12.4 vcarg - Vector complex argument arg(x)
12.5 vconj - Vector complex conjugate --
x
12.6 vcproj - Vector complex Riemann sphere projection proj(x)
12.7 vcexp - Vector complex exponentiation exp(x)
12.8 vclog - Vector complex logarithm log(x)
12.9 vcsqrt - Vector complex square root ⎷ --
  x
12.10 vcpow - Vector complex power  y
x
12.11 vcpows - Vector complex power scalar exponent  y
x
13 Complex Trigonometric Functions
13.1 vcsin - Vector complex sine sin(x)
13.2 vccos - Vector complex cosine cos(x)
13.3 vctan - Vector complex tangent tan(x)
13.4 vcasin - Vector complex arcsine   -1
sin  (x)
13.5 vcacos - Vector complex arccosine   -1
cos  (x)
13.6 vcatan - Vector complex arctangent    -1
tan  (x)
13.7 vcsinh - Vector complex hyperbolic sine sinh(x)
13.8 vccosh - Vector complex hyperbolic cosine cosh(x)
13.9 vctanh - Vector complex hyperbolic tangent tanh(x)
13.10 vcasinh - Vector complex hyperbolic arcsine     -1
sinh  (x)
13.11 vcacosh - Vector complex hyperbolic arccosine    -1
cosh  (x)
13.12 vcatanh - Vector complex hyperbolic arctangent     -1
tanh  (x)
14 Complex Arithmetic
14.1 vcadd - Vector complex addition x+ y
14.2 vcsadd - Vector complex scalar subtraction x+ α
14.3 vcsub - Vector complex subtraction x -y
14.4 vcssub - Vector complex scalar subtraction x- α
14.5 vcmul - Vector complex multiplication xy
14.6 vcsmul - Vector complex scalar multiplication αx
14.7 vcmulc - Vector complex conjugate multiplication  --
xy
14.8 vcdiv - Vector complex division x/y
14.9 vcsdiv - Vector complex scalar division x/α
15 Acknowledgements

[next]