Mathematic Trigonometry
#
acos
#
func acos(x interface{}) interface{}
Returns the arccosine, in radians, of x.
Special case is:
acos(x) = NaN if x < -1 or x > 1
Aliases
#
Examples
#
Razor: @ceil(acos(0.5) / 3.1416 * 180)
Template: {{ ceil (mul (div (acos 0.5) 3.1416) 180) }}
Result: 60
acosh
#
func acosh(x interface{}) interface{}
Returns the inverse hyperbolic cosine of x.
Special cases are:
acosh(+Inf) = +Inf
acosh(x) = NaN if x < 1
acosh(NaN) = NaN
Aliases
#
- arcHyperbolicCosine
- arcHyperbolicCosinus
asin
#
func asin(x interface{}) interface{}
Returns the arcsine, in radians, of x.
Special cases are:
asin(±0) = ±0
asin(x) = NaN if x < -1 or x > 1
Aliases
#
asinh
#
func asinh(x interface{}) interface{}
Returns the inverse hyperbolic sine of x.
Special cases are:
asinh(±0) = ±0
asinh(±Inf) = ±Inf
asinh(NaN) = NaN
Aliases
#
- arcHyperbolicSine
- arcHyperbolicSinus
atan
#
func atan(x interface{}) interface{}
Returns the arctangent, in radians, of x.
Special cases are:
atan(±0) = ±0
atan(±Inf) = ±Pi/2
Aliases
#
atan2
#
func atan2(x interface{}, y interface{}) interface{}
Returns the arc tangent of y/x, using the signs of the two to
determine the quadrant of the return value.
Special cases are (in order):
atan2(y, NaN) = NaN
atan2(NaN, x) = NaN
atan2(+0, x>=0) = +0
atan2(-0, x>=0) = -0
atan2(+0, x<=-0) = +Pi
atan2(-0, x<=-0) = -Pi
atan2(y>0, 0) = +Pi/2
atan2(y<0, 0) = -Pi/2
atan2(+Inf, +Inf) = +Pi/4
atan2(-Inf, +Inf) = -Pi/4
atan2(+Inf, -Inf) = 3Pi/4
atan2(-Inf, -Inf) = -3Pi/4
atan2(y, +Inf) = 0
atan2(y>0, -Inf) = +Pi
atan2(y<0, -Inf) = -Pi
atan2(+Inf, x) = +Pi/2
atan2(-Inf, x) = -Pi/2
Aliases
#
atanh
#
func atanh(x interface{}) interface{}
Returns the inverse hyperbolic tangent of x.
Special cases are:
atanh(1) = +Inf
atanh(±0) = ±0
atanh(-1) = -Inf
atanh(x) = NaN if x < -1 or x > 1
atanh(NaN) = NaN
Aliases
#
cos
#
func cos(x interface{}) interface{}
Returns the cosine of the radian argument x.
Special cases are:
cos(±Inf) = NaN
cos(NaN) = NaN
Aliases
#
cosh
#
func cosh(x interface{}) interface{}
Returns the hyperbolic cosine of x.
Special cases are:
cosh(±0) = 1
cosh(±Inf) = +Inf
cosh(NaN) = NaN
Aliases
#
- hyperbolicCosine
- hyperbolicCosinus
deg
#
func deg(arg1 interface{}) interface{}
Returns the decimal degree of the specified radian number.
Aliases
#
ilogb
#
func ilogb(x interface{}) interface{}
Returns the binary exponent of x as an integer.
Special cases are:
ilogb(±Inf) = MaxInt32
ilogb(0) = MinInt32
ilogb(NaN) = MaxInt32
j0
#
func j0(x interface{}) interface{}
Returns the order-zero Bessel function of the first kind.
Special cases are:
j0(±Inf) = 0
j0(0) = 1
j0(NaN) = NaN
Aliases
#
j1
#
func j1(x interface{}) interface{}
Returns the order-one Bessel function of the first kind.
Special cases are:
j1(±Inf) = 0
j1(NaN) = NaN
Aliases
#
jn
#
func jn(n interface{}, x interface{}) interface{}
Returns the order-n Bessel function of the first kind.
Special cases are:
jn(n, ±Inf) = 0
jn(n, NaN) = NaN
Aliases
#
log
#
func log(x interface{}) interface{}
Returns the natural logarithm of x.
Special cases are:
log(+Inf) = +Inf
log(0) = -Inf
log(x < 0) = NaN
log(NaN) = NaN
log10
#
func log10(x interface{}) interface{}
Returns the decimal logarithm of x. The special cases are the same as
for log.
log1p
#
func log1p(x interface{}) interface{}
Returns the natural logarithm of 1 plus its argument x. It is more
accurate than log(1 + x) when x is near zero.
Special cases are:
log1p(+Inf) = +Inf
log1p(±0) = ±0
log1p(-1) = -Inf
log1p(x < -1) = NaN
log1p(NaN) = NaN
log2
#
func log2(x interface{}) interface{}
Returns the binary logarithm of x. The special cases are the same as
for log.
logb
#
func logb(x interface{}) interface{}
Returns the binary exponent of x.
Special cases are:
logb(±Inf) = +Inf
logb(0) = -Inf
logb(NaN) = NaN
rad
#
func rad(arg1 interface{}) interface{}
Returns the radian of the specified decimal degree number.
Aliases
#
sin
#
func sin(x interface{}) interface{}
Returns the sine of the radian argument x.
Special cases are:
sin(±0) = ±0
sin(±Inf) = NaN
sin(NaN) = NaN
Aliases
#
sincos
#
func sincos(x interface{}) interface{}
Returns Sin(x), Cos(x).
Special cases are:
sincos(±0) = ±0, 1
sincos(±Inf) = NaN, NaN
sincos(NaN) = NaN, NaN
Aliases
#
sinh
#
func sinh(x interface{}) interface{}
Returns the hyperbolic sine of x.
Special cases are:
sinh(±0) = ±0
sinh(±Inf) = ±Inf
sinh(NaN) = NaN
Aliases
#
- hyperbolicSine
- hyperbolicSinus
tan
#
func tan(x interface{}) interface{}
Returns the tangent of the radian argument x.
Special cases are:
tan(±0) = ±0
tan(±Inf) = NaN
tan(NaN) = NaN
Aliases
#
tanh
#
func tanh(x interface{}) interface{}
Returns the hyperbolic tangent of x.
Special cases are:
tanh(±0) = ±0
tanh(±Inf) = ±1
tanh(NaN) = NaN
Aliases
#
y0
#
func y0(x interface{}) interface{}
Returns the order-zero Bessel function of the second kind.
Special cases are:
y0(+Inf) = 0
y0(0) = -Inf
y0(x < 0) = NaN
y0(NaN) = NaN
Aliases
#
y1
#
func y1(x interface{}) interface{}
Returns the order-one Bessel function of the second kind.
Special cases are:
y1(+Inf) = 0
y1(0) = -Inf
y1(x < 0) = NaN
y1(NaN) = NaN
Aliases
#
yn
#
func yn(n interface{}, x interface{}) interface{}
Returns the order-n Bessel function of the second kind.
Special cases are:
yn(n, +Inf) = 0
yn(n ≥ 0, 0) = -Inf
yn(n < 0, 0) = +Inf if n is odd, -Inf if n is even
yn(n, x < 0) = NaN
yn(n, NaN) = NaN
Aliases
#