Math Scalar Library
Programming Reference Manual Fortran
Version 1.1 DD-00003-111
Math Scalar Library 1.1
Reference Manual (Fortran)
DD-00003-111
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
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
5.2
srsqrt
- Inverse square root
5.3
scbrt
- Cube root
5.4
srcbrt
- Inverse cube root
6
Trigonometric Functions
6.1
ssin
- Sine
6.2
scos
- Cosine
6.3
stan
- Tangent
6.4
scsc
- Cosecant
6.5
ssec
- Secant
6.6
scot
- Cotangent
6.7
sasin
- Arcsine
6.8
sacos
- Arccosine
6.9
satan
- Arctangent
6.10
sacsc
- Arccosecant
6.11
sasec
- Arcsecant
6.12
sacot
- Arcotangent
7
Trigonometric Functions (Half-Cycle)
7.1
ssinpi
- Half-Cycle Sine
7.2
scospi
- Half-Cycle Cosine
7.3
stanpi
- Half-Cycle Tangent
7.4
scscpi
- Half-Cycle Cosecant
7.5
ssecpi
- Half-Cycle Secant
7.6
scotpi
- Half-Cycle Cotangent
7.7
sasinpi
- Half-Cycle Arcsine
7.8
sacospi
- Half-Cycle Arccosine
7.9
satanpi
- Half-Cycle Arctangent
7.10
sacscpi
- Half-Cycle Arccosecant
7.11
sasecpi
- Half-Cycle Arcsecant
7.12
sacotpi
- Half-Cycle Arcotangent
8
Trigonometric Functions (Degrees)
8.1
ssind
- Degree Sine
8.2
scosd
- Degree Cosine
8.3
stand
- Degree Tangent
8.4
scscd
- Degree Cosecant
8.5
ssecd
- Degree Secant
8.6
scotd
- Degree Cotangent
8.7
sasind
- Degree Arcsine
8.8
sacosd
- Degree Arccosine
8.9
satand
- Degree Arctangent
8.10
sacscd
- Degree Arccosecant
8.11
sasecd
- Degree Arcsecant
8.12
sacotd
- Degree Arcotangent
9
Hypergeometric Functions
9.1
ssinh
- Hypergeometric sine
9.2
scosh
- Hypergeometric cosine
9.3
stanh
- Hypergeometric tangent
9.4
scsch
- Hypergeometric Cosecant
9.5
scsch
- Hypergeometric Secant
9.6
scsch
- Hypergeometric Cotangent
9.7
sasinh
- Hypergeometric arcsine
9.8
sacosh
- Hypergeometric arccosine
9.9
satanh
- Hypergeometric arctangent
9.10
sacsch
- Hypergeometric arccosecant
9.11
sasech
- Hypergeometric arcsecant
9.12
sacoth
- Hypergeometric arccotangent
10
Hypergeometric Functions Minus X
10.1
ssinhmx
- Hypergeometric sine minus x
10.2
scoshmx
- Hypergeometric cosine minux x
10.3
stanhmx
- Hypergeometric tangent minus x
11
Versine Functions
11.1
sver
- Versine
11.2
svcs
- Vercosine
11.3
scvs
- Coversine
11.4
scvc
- Covercone
11.5
shav
- Haversine
11.6
shac
- Havercosine
11.7
shcv
- Hacoversine
11.8
shcc
- Hacovercosine
11.9
saver
- Arcversine
11.10
savcs
- Arcvercosine
11.11
sacvs
- Arccoversine
11.12
sacvc
- Arccovercone
11.13
sahav
- Archaversine
11.14
sahac
- Archavercosine
11.15
sahcv
- Archacoversine
11.16
sahcc
- Archacovercosine
12
Versines (Half-Cycle)
12.1
sverpi
- Half-Cycle Versine
12.2
svcspi
- Half-Cycle Vercosine
12.3
scvspi
- Half-Cycle Coversine
12.4
scvcpi
- Half-Cycle Covercosine
12.5
shavpi
- Half-Cycle Haversine
12.6
shacpi
- Half-Cycle Havercosine
12.7
shcvpi
- Half-Cycle Hacoversine
12.8
shccpi
- Half-Cycle Hacovercosine
12.9
saverpi
- Half-Cycle Arcversine
12.10
savcspi
- Half-Cycle Arcvercosine
12.11
sacvspi
- Half-Cycle Arccoversine
12.12
sacvcpi
- Half-Cycle Arccovercone
12.13
sahavpi
- Half-Cycle Archaversine
12.14
sahacpi
- Half-Cycle Archavercosine
12.15
sahcvpi
- Half-Cycle Archacoversine
12.16
sahccpi
- Half-Cycle Archacovercosine
13
Versines (Degree)
13.1
sverd
- Versine
13.2
svcsd
- Vercosine
13.3
scvsd
- Coversine
13.4
scvcd
- Covercosine
13.5
shavd
- Haversine
13.6
shacd
- Havercosine
13.7
shcvd
- Hacoversine
13.8
shccd
- Hacovercosine
13.9
saverd
- Arcversine
13.10
savcsd
- Arcvercosine
13.11
sacvsd
- Arccoversine
13.12
sacvcd
- Arccovercone
13.13
sahavd
- Archaversine
13.14
sahacd
- Archavercosine
13.15
sahcvd
- Archacoversine
13.16
sahccd
- Archacovercosine
14
Exsecant and Excosecant
14.1
sexs
- Exsecant
14.2
sexc
- Excosecant
14.3
saexs
- Arcexsecant
14.4
saexc
- Arcexcosecant
15
Exsecant and Excosecant (Half-Cycle)
15.1
sexspi
- Half-Cycle Exsecant
15.2
sexcpi
- Half-Cycle Excosecant
15.3
saexspi
- Half-Cycle Arcexsecant
15.4
saexcpi
- Half-Cycle Arcexcosecant
16
Exsecant and Excosecant (Degrees)
16.1
sexsd
- Exsecant
16.2
sexcd
- Excosecant
16.3
saexsd
- Arcexsecant
16.4
saexcd
- Arcexcosecant
17
Other Trigonometric functions
17.1
sgd
- Gudermannian function
17.2
sagd
- Inverse Gudermannian function
17.3
scrd
- Chord
17.4
sacrd
- Inverse Chord
18
Cardinal Trigonometric Functions
18.1
ssinc
- Cardinal Sine
18.2
scosc
- Cardinal Cosine
18.3
stanc
- Cardinal Tangent
19
Cardinal Normalized Trigonometric Functions
19.1
ssincpi
- Cardinal Normalized Sine
19.2
scoscpi
- Cardinal Normalized Cosine
19.3
stancpi
- Cardinal Normalized Tangent
20
Cardinal Hyperbolic Trigonometric Functions
20.1
ssinhc
- Cardinal Hyperbolic Sine
20.2
scoshc
- Cardinal Hyperbolic Cosine
20.3
stanhc
- Cardinal Hyperbolic Tangent
21
Expoentials and Logarithms
21.1
sexp
- Exponentiation
21.2
sexpm1
- Exponentiation
21.3
sexp2
- Binary exponentiation
21.4
sexp2m1
- Binary exponentiation minus one
21.5
sexp10
- Natural exponentiation
21.6
sexp10m1
- Natural exponentiation minus one
21.7
slog
- Natural logarithm
21.8
slog2
- Base-2 logarithm
21.9
slog10
- Base-10 logarithm
21.10
slog1p
- Natural logarithm plus one
21.11
spow
- Raise
21.12
sfmod
- Remainder
22
Special Functions
22.1
serf
- Error function
22.2
serfinv
- Inverse Error function
22.3
serfc
- Complementary error function
22.4
serfcinv
- Inverse Complementary error function
22.5
sj0
- Bessel function
22.6
sy0
- Bessel function
22.7
sj1
- Bessel function
22.8
sy1
- Bessel function
22.9
sjn
- Bessel function
22.10
syn
- Bessel function
22.11
slgamma
- Log-Gamma function
22.12
seinst1
- Einstein function
22.13
seinst2
- Einstein function
22.14
seinst3
- Einstein function
22.15
seinst4
- Einstein function
22.16
ssi
- Sine Integral
22.17
sci
- Cosine Integral
22.18
sti2
- Inverse Tangent Integral
23
Other Functions
23.1
sfabs
- Absolute value
23.2
scopysign
- Copy sign
23.3
shypot
- Euclidean distance
23.4
sremainder
- Remainder
24
Complex Numbers
24.1
screal
- Complex real component
24.2
scimag
- Complex imaginary component
24.3
scabs
- Complex absolute value
24.4
scarg
- Complex argument
24.5
sconj
- Complex conjugate
24.6
scproj
- Complex Riemann sphere projection
24.7
scexp
- Complex exponentiation
24.8
sclog
- Complex logarithm
24.9
scsqrt
- Complex square root
24.10
scpow
- Complex power
24.11
sccis
- Complex Euler’s Formula
25
Complex Trigonometry
25.1
scsin
- Complex sine
25.2
sccos
- Complex cosine
25.3
sctan
- Complex tangent
25.4
scasin
- Complex arcsine
25.5
scacos
- Complex arccosine
25.6
scatan
- Complex arctangent
25.7
scsinh
- Complex hyperbolic sine
25.8
sccosh
- Complex hyperbolic cosine
25.9
sctanh
- Complex hyperbolic tangent
25.10
sccsch
- Complex hyperbolic cosecant
25.11
scsech
- Complex hyperbolic secant
25.12
sccoth
- Complex hyperbolic cotangent
25.13
scasinh
- Complex hyperbolic arcsine
25.14
scacosh
- Complex hyperbolic arccosine
25.15
scatanh
- Complex hyperbolic arctangent
25.16
scacsch
- Complex hyperbolic arccosecant
25.17
scasech
- Complex hyperbolic arcsecant
25.18
scacoth
- Complex hyperbolic arccotangent
25.19
scgd
- Complex Gudermannian
25.20
scagd
- Complex inverse Gudermannian
26
Complex Versines
26.1
scver
- Complex Versine
26.2
scvcs
- Complex Vercosine
26.3
sccvs
- Complex Coversine
26.4
sccvc
- Complex Covercone
26.5
schav
- Complex Haversine
26.6
schac
- Complex Havercosine
26.7
schcv
- Complex Hacoversine
26.8
schcc
- Complex Hacovercosine
26.9
scaver
- Complex Arcversine
26.10
scavcs
- Complex Arcvercosine
26.11
scacvs
- Complex Arccoversine
26.12
scacvc
- Complex Arccovercone
26.13
scahav
- Complex Archaversine
26.14
scahac
- Complex Archavercosine
26.15
scahcv
- Complex Archacoversine
26.16
scahcc
- Complex Archacovercosine
27
Complex Cardinal Trigonometric Functions
27.1
scsinc
- Complex Cardinal Sine
27.2
sccosc
- Complex Cardinal Cosine
27.3
sctanc
- Complex Cardinal Tangent
28
Complex Cardinal Hyperbolic Trigonometric Functions
28.1
scsinhc
- Complex Cardinal Hyperbolic Sine
28.2
sccoshc
- Complex Cardinal Hyperbolic Cosine
28.3
sctanhc
- Complex Cardinal Hyperbolic Tangent
29
Acknowledgements
[
next
]