Math Vector Library
Programming Reference Manual C/C++
Version 1.1 DD-00002-011

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

Jan Adelsbach

February 17, 2025
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
2.5 Extended Vector Sizes (_64 suffix functions)
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 half-cycle sine sin(πx)
6.15 vcospi - Vector half-cycle cosine cos(πx)
6.16 vtanpi - Vector half-cycle tangent tan(πx)
6.17 vasinpi - Vector half-cycle arcsine    -1
sin (x)/π
6.18 vacospi - Vector half-cycle arccosine   -1
cos  (x)/π
6.19 vatanpi - Vector half-cycle 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 vexp2m1 - Vector binary exponential minus one  x
2 -1
8.5 vexp10 - Vector natural exponential   x
10
8.6 vexp10m1 - Vector natural exponential minus one   x
10 -1
8.7 vlog - Vector logarithm log(x)
8.8 vlog2 - Vector binary logarithm log2(x)
8.9 vlog10 - Vector base-10 logarithm log10(x)
8.10 vlog1p - Vector logarithm log(x+ 1)
8.11 vpow - Vector power  y
x
8.12 vpows - Vector power scalar exponent y
x
8.13 vmod - Vector modulus mod(x,y)
9 Error Functions
9.1 verf - Vector error function erf(x)
9.2 verfinv - Vector inverse error function   -1
erf  (x)
9.3 verfc - Vector complementary error function erfc(x)
9.4 verfcinv - Vector inverse complementary error function    -1
erfc  (x)
10 Bessel Functions
10.1 vbesj0 - Vector Bessel Function J0(x)
10.2 vbesy0 - Vector Bessel Function Y0(x)
10.3 vbesj1 - Vector Bessel Function J1(x)
10.4 vbesy1 - Vector Bessel Function Y1(x)
10.5 vbesjn - Vector Bessel Function Jn(x)
10.6 vbesyn - Vector Bessel Function Yn(x)
11 Gamma Function Related
11.1 vlgamma - Vector Log-Gamma logΓ (x)
12 Einstein Functions
12.1 veinst1 - Vector Einstein function E1(x)
12.2 veinst2 - Vector Einstein function E2(x)
12.3 veinst3 - Vector Einstein function E3(x)
12.4 veinst4 - Vector Einstein function E4(x)
13 Integrals
13.1 vsi - Vector Sine Integral Si(x)
13.2 vci - Vector Cosine Integral Ci(x)
13.3 vti2 - Vector Inverse Tangent Integral Ti2(x)
14 Other Functions
14.1 vabs - Vector absolute value |x|
14.2 vhypot - Vector euclidean distance √︁ -2--2-
  x +y
14.3 vrem - Vector remainder
15 Arithmetic Functions
15.1 vadd - Vector addition x+y
15.2 vsadd - Vector scalar addition x+ α
15.3 vsub - Vector subtraction x-y
15.4 vssub - Vector scalar subtraction x-α
15.5 vmul - Vector multiplication xy
15.6 vsmul - Vector scalar multiplication αx
15.7 vdiv - Vector division x/y
15.8 vsdiv - Vector scalar division x/α
15.9 vrecp - Vector reciprocal 1/x
16 Complex Numbers
16.1 vcreal - Vector complex real compoment Re(x)
16.2 vcimag - Vector complex imaginary compoment Im(x)
16.3 vcabs - Vector complex absolute value |x|
16.4 vcarg - Vector complex argument arg(x)
16.5 vconj - Vector complex conjugate --
x
16.6 vcproj - Vector complex Riemann sphere projection proj(x)
17 Complex Exponentials and Logarithms
17.1 vcexp - Vector complex exponentiation exp(x)
17.2 vclog - Vector complex logarithm log(x)
17.3 vcpow - Vector complex power  y
x
17.4 vcpows - Vector complex power scalar exponent  y
x
17.5 vccis - Vector complex Euler’s Formula exp(ix)
18 Complex Roots
18.1 vcsqrt - Vector complex square root ⎷ --
  x
19 Complex Trigonometric Functions
19.1 vcsin - Vector complex sine sin(x)
19.2 vccos - Vector complex cosine cos(x)
19.3 vctan - Vector complex tangent tan(x)
19.4 vcasin - Vector complex arcsine   -1
sin  (x)
19.5 vcacos - Vector complex arccosine   -1
cos  (x)
19.6 vcatan - Vector complex arctangent    -1
tan  (x)
20 Complex Hypergeometric Functions
20.1 vcsinh - Vector complex hyperbolic sine sinh(x)
20.2 vccosh - Vector complex hyperbolic cosine cosh(x)
20.3 vctanh - Vector complex hyperbolic tangent tanh(x)
20.4 vcasinh - Vector complex hyperbolic arcsine     -1
sinh  (x)
20.5 vcacosh - Vector complex hyperbolic arccosine    -1
cosh  (x)
20.6 vcatanh - Vector complex hyperbolic arctangent     -1
tanh  (x)
21 Complex Arithmetic
21.1 vcadd - Vector complex addition x+ y
21.2 vcsadd - Vector complex scalar subtraction x+ α
21.3 vcsub - Vector complex subtraction x -y
21.4 vcssub - Vector complex scalar subtraction x- α
21.5 vcmul - Vector complex multiplication xy
21.6 vcsmul - Vector complex scalar multiplication αx
21.7 vcmulc - Vector complex conjugate multiplication  --
xy
21.8 vcdiv - Vector complex division x/y
21.9 vcsdiv - Vector complex scalar division x/α
22 Acknowledgements

[next]