Trigonometry Functions (25)

Trigonometric and hyperbolic functions

acos
Compute the inverse cosine of a value in radians.
Syntax
acos(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — The arc cosine of x
Examples
acos(0.5)
acos(cos(2.3))
See Also
cos atan asin
acosh
Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.
Syntax
acosh(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — Hyperbolic arccosine of x
Examples
acosh(1.5)
See Also
cosh asinh atanh
acot
Calculate the inverse cotangent of a value.
Syntax
acot(x)
Parameters
NameTypeDescription
xnumber | BigNumber| ComplexFunction input
Returns
number | BigNumber| Complex — The arc cotangent of x
Examples
acot(0.5)
acot(cot(0.5))
acot(2)
See Also
cot atan
acoth
Calculate the inverse hyperbolic tangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.
Syntax
acoth(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — Hyperbolic arccotangent of x
Examples
acoth(2)
acoth(0.5)
See Also
acsch asech
acsc
Calculate the inverse cotangent of a value.
Syntax
acsc(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — The arc cosecant of x
Examples
acsc(2)
acsc(csc(0.5))
acsc(0.5)
See Also
csc asin asec
acsch
Calculate the inverse hyperbolic cosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.
Syntax
acsch(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — Hyperbolic arccosecant of x
Examples
acsch(0.5)
See Also
asech acoth
asec
Calculate the inverse secant of a value.
Syntax
asec(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — The arc secant of x
Examples
asec(0.5)
asec(sec(0.5))
asec(2)
See Also
acos acot acsc
asech
Calculate the inverse secant of a value.
Syntax
asech(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — Hyperbolic arcsecant of x
Examples
asech(0.5)
See Also
acsch acoth
asin
Compute the inverse sine of a value in radians.
Syntax
asin(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — The arc sine of x
Examples
asin(0.5)
asin(sin(0.5))
See Also
sin acos atan
asinh
Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.
Syntax
asinh(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — Hyperbolic arcsine of x
Examples
asinh(0.5)
See Also
acosh atanh
atan
Compute the inverse tangent of a value in radians.
Syntax
atan(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — The arc tangent of x
Examples
atan(0.5)
atan(tan(0.5))
See Also
tan acos asin
atan2
Computes the principal value of the arc tangent of y/x in radians.
Syntax
atan2(y | x)
Parameters
NameTypeDescription
ynumber | Array | MatrixSecond dimension
xnumber | Array | MatrixFirst dimension
Returns
number | Array | Matrix — Four-quadrant inverse tangent
Examples
atan2(2
2) / pi
angle = 60 deg in rad
x = cos(angle)
y = sin(angle)
See Also
sin cos tan
atanh
Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.
Syntax
atanh(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — Hyperbolic arctangent of x
Examples
atanh(0.5)
See Also
acosh asinh
cos
Compute the cosine of x in radians.
Syntax
cos(x)
Parameters
NameTypeDescription
xnumber | BigNumber | Complex | UnitFunction input
Returns
number | BigNumber | Complex — Cosine of x
Examples
cos(2)
cos(pi / 4) ^ 2
cos(180 deg)
cos(60 deg)
sin(0.2)^2 + cos(0.2)^2
See Also
acos sin tan
cosh
Compute the hyperbolic cosine of x in radians.
Syntax
cosh(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — Hyperbolic cosine of x
Examples
cosh(0.5)
See Also
sinh tanh coth
cot
Compute the cotangent of x in radians. Defined as 1/tan(x)
Syntax
cot(x)
Parameters
NameTypeDescription
xnumber | Complex | Unit | Array | MatrixFunction input
Returns
number | Complex | Array | Matrix — Cotangent of x
Examples
cot(2)
1 / tan(2)
See Also
sec csc tan
coth
Compute the hyperbolic cotangent of x in radians.
Syntax
coth(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — Hyperbolic cotangent of x
Examples
coth(2)
1 / tanh(2)
See Also
sech csch tanh
csc
Compute the cosecant of x in radians. Defined as 1/sin(x)
Syntax
csc(x)
Parameters
NameTypeDescription
xnumber | BigNumber | Complex | UnitFunction input
Returns
number | BigNumber | Complex — Cosecant of x
Examples
csc(2)
1 / sin(2)
See Also
sec cot sin
csch
Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)
Syntax
csch(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — Hyperbolic cosecant of x
Examples
csch(2)
1 / sinh(2)
See Also
sech coth sinh
sec
Compute the secant of x in radians. Defined as 1/cos(x)
Syntax
sec(x)
Parameters
NameTypeDescription
xnumber | BigNumber | Complex | UnitFunction input
Returns
number | BigNumber | Complex — Secant of x
Examples
sec(2)
1 / cos(2)
See Also
cot csc cos
sech
Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)
Syntax
sech(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — Hyperbolic secant of x
Examples
sech(2)
1 / cosh(2)
See Also
coth csch cosh
sin
Compute the sine of x in radians.
Syntax
sin(x)
Parameters
NameTypeDescription
xnumber | BigNumber | Complex | UnitFunction input
Returns
number | BigNumber | Complex — Sine of x
Examples
sin(2)
sin(pi / 4) ^ 2
sin(90 deg)
sin(30 deg)
sin(0.2)^2 + cos(0.2)^2
See Also
asin cos tan
sinh
Compute the hyperbolic sine of x in radians.
Syntax
sinh(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — Hyperbolic sine of x
Examples
sinh(0.5)
See Also
cosh tanh
tan
Compute the tangent of x in radians.
Syntax
tan(x)
Parameters
NameTypeDescription
xnumber | BigNumber | Complex | UnitFunction input
Returns
number | BigNumber | Complex — Tangent of x
Examples
tan(0.5)
sin(0.5) / cos(0.5)
tan(pi / 4)
tan(45 deg)
See Also
atan sin cos
tanh
Compute the hyperbolic tangent of x in radians.
Syntax
tanh(x)
Parameters
NameTypeDescription
xnumber | BigNumber | ComplexFunction input
Returns
number | BigNumber | Complex — Hyperbolic tangent of x
Examples
tanh(0.5)
sinh(0.5) / cosh(0.5)
See Also
sinh cosh