3.9 Trigonometric functions
real
hypot
(real x, real y)
Return the length of the hypotenuse of a right triangle with sides of
length x and y. \[ \text{hypot}(x,y) = \begin{cases} \sqrt{x^2+y^2} &
\text{if } x,y\geq 0 \\ \textrm{NaN} & \text{otherwise} \end{cases} \]
Available since 2.0
R
hypot
(T1 x, T2 y)
Vectorized implementation of the hypot
function
Available since 2.25
R
cos
(T x)
cosine of the angle x (in radians)
Available since 2.0, vectorized in 2.13
R
sin
(T x)
sine of the angle x (in radians)
Available since 2.0, vectorized in 2.13
R
tan
(T x)
tangent of the angle x (in radians)
Available since 2.0, vectorized in 2.13
R
acos
(T x)
principal arc (inverse) cosine (in radians) of x
Available since 2.0, vectorized in 2.13
R
asin
(T x)
principal arc (inverse) sine (in radians) of x
Available since 2.0
R
atan
(T x)
principal arc (inverse) tangent (in radians) of x, with values from
\(-\pi/2\) to \(\pi/2\)
Available since 2.0, vectorized in 2.13
real
atan2
(real y, real x)
Return the principal arc (inverse) tangent (in radians) of y divided
by x, \[ \text{atan2}(y, x) = \arctan\left(\frac{y}{x}\right) \]
Available since 2.0, vectorized in 2.13