Math Scalar Library
Programming Reference Manual C/C++
Version 1.0 DD-00003-010

Math Scalar Library
Reference Manual (C/C++)
DD-00003-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 Function Naming Scheme
2.3 Thread Safety
2.4 FPU Signaling
3 Utility
3.1 mscaver - Version query
4 Rounding
4.1 sfloor - Round down to nearest integral part
4.2 sceil - Round up to nearest integral part
4.3 strunc - Truncate to nearest integral part
4.4 sround - Round to nearest integral part
5 Roots
5.1 ssqrt - Square root ⎷-
 x
5.2 srsqrt - Inverse square root   ⎷-
1/ x
5.3 scbrt - Cube root ⎷3-
  x
5.4 srcbrt - Inverse cube root   3⎷-
1/ x
6 Trigonometric Functions
6.1 ssin - Sine sin(x)
6.2 scos - Cosine cos(x)
6.3 stan - Tangent tan(x)
6.4 sasin - Arcsine   -1
sin  (x)
6.5 sacos - Arccosine    -1
cos (x)
6.6 satan - Arctangent   -1
tan  (x)
7 Hypergeometric Functions
7.1 ssinh - Hypergeometric sine sinh(x)
7.2 scosh - Hypergeometric cosine cosh(x)
7.3 stanh - Hypergeometric tangent tanh(x)
7.4 sasinh - Hypergeometric arcsine    -1
sinh  (x)
7.5 sacosh - Hypergeometric arccosine    -1
cosh  (x)
7.6 satanh - Hypergeometric arctangent     -1
tanh (x)
8 Expoentials and Logarithms
8.1 sexp - Exponentiation  x
e
8.2 sexpm1 - Exponentiation  x
e -1
8.3 sexp2 - Binary exponentiation  x
2
8.4 slog - Natural logarithm log(x)
8.5 slog2 - Base-2 logarithm log2(x)
8.6 slog10 - Base-10 logarithm log10(x)
8.7 slog1p - Natural logarithm plus one log(x+1)
8.8 spow - Raise  y
x
8.9 sfmod - Remainder mod(x,y)
9 Special Functions
9.1 serf - Error function erf(x)
9.2 serfc - Complementary error function erfc(x)
9.3 sj0 - Bessel function J0(x)
9.4 sy0 - Bessel function Y0(x)
9.5 sj1 - Bessel function J1(x)
9.6 sy1 - Bessel function Y1(x)
9.7 sjn - Bessel function Jn(x)
9.8 syn - Bessel function Yn(x)
9.9 slgamma - Log-Gamma function logΓ (x)
10 Other Functions
10.1 sfabs - Absolute value |x|
10.2 scopysign - Copy sign
10.3 shypot - Euclidean distance √︁-2---2
 x + y
10.4 sremainder - Remainder
11 Complex Numbers
11.1 screal - Complex real component Re(x)
11.2 scimag - Complex imaginary component Im(x)
11.3 scabs - Complex absolute value |x|
11.4 scarg - Complex argument arg(x)
11.5 sconj - Complex conjugate -
x
11.6 scproj - Complex Riemann sphere projection proj(x)
11.7 scexp - Complex exponentiation exp(x)
11.8 sclog - Complex logarithm log(x)
11.9 scsin - Complex sine sin(x)
11.10 sccos - Complex cosine cos(x)
11.11 sctan - Complex tangent tan(x)
11.12 scasin - Complex arcsine   -1
sin  (x)
11.13 scacos - Complex arccosine   -1
cos  (x)
11.14 scatan - Complex arctangent    -1
tan (x)
11.15 scsinh - Complex hyperbolic sine sinh(x)
11.16 sccosh - Complex hyperbolic cosine cosh(x)
11.17 sctanh - Complex hyperbolic tangent tanh(x)
11.18 scasinh - Complex hyperbolic arcsine    -1
sinh  (x)
11.19 scacosh - Complex hyperbolic arccosine     -1
cosh  (x)
11.20 scatanh - Complex hyperbolic arctangent     -1
tanh (x)
11.21 scsqrt - Complex square root ⎷-
 x
11.22 scpow - Complex power  y
x
12 Acknowledgements

[next]