Namespace: go.std.math
v1.0Contents
Summary
Provides a low-level interface to the math package.
Package math provides basic constants and mathematical functions.
This package does not guarantee bit-identical results across architectures.
Index
- Abs
- Acos
- Acosh
- Asin
- Asinh
- Atan
- Atan2
- Atanh
- Cbrt
- Ceil
- Copysign
- Cos
- Cosh
- Dim
- E
- Erf
- Erfc
- Erfcinv
- Erfinv
- Exp
- Exp2
- Expm1
- FMA
- Float32bits
- Float32frombits
- Float64bits
- Float64frombits
- Floor
- Frexp
- Gamma
- Hypot
- Ilogb
- Inf
- IsInf
- IsNaN
- J0
- J1
- Jn
- Ldexp
- Lgamma
- Ln10
- Ln2
- Log
- Log10
- Log10E
- Log1p
- Log2
- Log2E
- Logb
- Max
- MaxFloat32
- MaxFloat64
- MaxInt
- MaxInt16
- MaxInt32
- MaxInt64
- MaxInt8
- MaxUint
- MaxUint16
- MaxUint32
- MaxUint64
- MaxUint8
- Min
- MinInt
- MinInt16
- MinInt32
- MinInt64
- MinInt8
- Mod
- Modf
- NaN
- Nextafter
- Nextafter32
- Phi
- Pi
- Pow
- Pow10
- Remainder
- Round
- RoundToEven
- Signbit
- Sin
- Sincos
- Sinh
- SmallestNonzeroFloat32
- SmallestNonzeroFloat64
- Sqrt
- Sqrt2
- SqrtE
- SqrtPhi
- SqrtPi
- Tan
- Tanh
- Trunc
- Y0
- Y1
- Yn
Legend
-
Constant
Variable
Function
Macro
Special form
Type
GoVar
Receiver/Method
Constants
Constants are variables with :const true in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.-
E
BigFloat v1.0https://oeis.org/A001113
-
Ln10
BigFloat v1.0https://oeis.org/A002392
-
Ln2
BigFloat v1.0https://oeis.org/A002162
-
Log10E
Ratio v1.0Mathematical constants.
-
Log2E
Ratio v1.0Mathematical constants.
-
MaxFloat32
Double v1.03.40282346638528859811704183484516925440e+38
-
MaxFloat64
Double v1.01.79769313486231570814527423731704356798070e+308
-
MaxInt
Int v1.0Integer limit values.
-
MaxInt16
Int v1.0Integer limit values.
-
MaxInt32
Int v1.0Integer limit values.
-
MaxInt64
Int v1.0Integer limit values.
-
MaxInt8
Int v1.0Integer limit values.
-
MaxUint
Number v1.0Integer limit values.
-
MaxUint16
Int v1.0Integer limit values.
-
MaxUint32
Int v1.0Integer limit values.
-
MaxUint64
Number v1.0Integer limit values.
-
MaxUint8
Int v1.0Integer limit values.
-
MinInt
Int v1.0Integer limit values.
-
MinInt16
Int v1.0Integer limit values.
-
MinInt32
Int v1.0Integer limit values.
-
MinInt64
Int v1.0Integer limit values.
-
MinInt8
Int v1.0Integer limit values.
-
Phi
BigFloat v1.0https://oeis.org/A001622
-
Pi
BigFloat v1.0https://oeis.org/A000796
-
SmallestNonzeroFloat32
Double v1.01.401298464324817070923729583289916131280e-45
-
SmallestNonzeroFloat64
Double v1.04.9406564584124654417656879286822137236505980e-324
-
Sqrt2
BigFloat v1.0https://oeis.org/A002193
-
SqrtE
BigFloat v1.0https://oeis.org/A019774
-
SqrtPhi
BigFloat v1.0https://oeis.org/A139339
-
SqrtPi
BigFloat v1.0https://oeis.org/A002161
Variables
-
(None.)
Functions, Macros, and Special Forms
-
Abs
Function v1.0(Abs x)
Abs returns the absolute value of x.
Special cases are:
Abs(±Inf) = +Inf
Abs(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Acos
Function v1.0(Acos x)
Acos returns the arccosine, in radians, of x.
Special case is:
Acos(x) = NaN if x < -1 or x > 1
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Acosh
Function v1.0(Acosh x)
Acosh returns the inverse hyperbolic cosine of x.
Special cases are:
Acosh(+Inf) = +Inf
Acosh(x) = NaN if x < 1
Acosh(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Asin
Function v1.0(Asin x)
Asin returns the arcsine, in radians, of x.
Special cases are:
Asin(±0) = ±0
Asin(x) = NaN if x < -1 or x > 1
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Asinh
Function v1.0(Asinh x)
Asinh returns the inverse hyperbolic sine of x.
Special cases are:
Asinh(±0) = ±0
Asinh(±Inf) = ±Inf
Asinh(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Atan
Function v1.0(Atan x)
Atan returns the arctangent, in radians, of x.
Special cases are:
Atan(±0) = ±0
Atan(±Inf) = ±Pi/2
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Atan2
Function v1.0(Atan2 y x)
Atan2 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
Go input arguments: (y float64, x float64)
Go returns: float64
Joker input arguments: [^Double y, ^Double x]
Joker returns: ^Double -
Atanh
Function v1.0(Atanh x)
Atanh 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
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Cbrt
Function v1.0(Cbrt x)
Cbrt returns the cube root of x.
Special cases are:
Cbrt(±0) = ±0
Cbrt(±Inf) = ±Inf
Cbrt(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Ceil
Function v1.0(Ceil x)
Ceil returns the least integer value greater than or equal to x.
Special cases are:
Ceil(±0) = ±0
Ceil(±Inf) = ±Inf
Ceil(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Copysign
Function v1.0(Copysign x y)
Copysign returns a value with the magnitude
of x and the sign of y.
Go input arguments: (x float64, y float64)
Go returns: float64
Joker input arguments: [^Double x, ^Double y]
Joker returns: ^Double -
Cos
Function v1.0(Cos x)
Cos returns the cosine of the radian argument x.
Special cases are:
Cos(±Inf) = NaN
Cos(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Cosh
Function v1.0(Cosh x)
Cosh returns the hyperbolic cosine of x.
Special cases are:
Cosh(±0) = 1
Cosh(±Inf) = +Inf
Cosh(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Dim
Function v1.0(Dim x y)
Dim returns the maximum of x-y or 0.
Special cases are:
Dim(+Inf, +Inf) = NaN
Dim(-Inf, -Inf) = NaN
Dim(x, NaN) = Dim(NaN, x) = NaN
Go input arguments: (x float64, y float64)
Go returns: float64
Joker input arguments: [^Double x, ^Double y]
Joker returns: ^Double -
Erf
Function v1.0(Erf x)
Erf returns the error function of x.
Special cases are:
Erf(+Inf) = 1
Erf(-Inf) = -1
Erf(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Erfc
Function v1.0(Erfc x)
Erfc returns the complementary error function of x.
Special cases are:
Erfc(+Inf) = 0
Erfc(-Inf) = 2
Erfc(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Erfcinv
Function v1.0(Erfcinv x)
Erfcinv returns the inverse of Erfc(x).
Special cases are:
Erfcinv(0) = +Inf
Erfcinv(2) = -Inf
Erfcinv(x) = NaN if x < 0 or x > 2
Erfcinv(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Erfinv
Function v1.0(Erfinv x)
Erfinv returns the inverse error function of x.
Special cases are:
Erfinv(1) = +Inf
Erfinv(-1) = -Inf
Erfinv(x) = NaN if x < -1 or x > 1
Erfinv(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Exp
Function v1.0(Exp x)
Exp returns e**x, the base-e exponential of x.
Special cases are:
Exp(+Inf) = +Inf
Exp(NaN) = NaN
Very large values overflow to 0 or +Inf.
Very small values underflow to 1.
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Exp2
Function v1.0(Exp2 x)
Exp2 returns 2**x, the base-2 exponential of x.
Special cases are the same as Exp.
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Expm1
Function v1.0(Expm1 x)
Expm1 returns e**x - 1, the base-e exponential of x minus 1.
It is more accurate than Exp(x) - 1 when x is near zero.
Special cases are:
Expm1(+Inf) = +Inf
Expm1(-Inf) = -1
Expm1(NaN) = NaN
Very large values overflow to -1 or +Inf.
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
FMA
Function v1.0(FMA x y z)
FMA returns x * y + z, computed with only one rounding.
(That is, FMA returns the fused multiply-add of x, y, and z.)
Go input arguments: (x float64, y float64, z float64)
Go returns: float64
Joker input arguments: [^Double x, ^Double y, ^Double z]
Joker returns: ^Double -
Float32bits
Function v1.0(Float32bits f)
Float32bits returns the IEEE 754 binary representation of f,
with the sign bit of f and the result in the same bit position.
Float32bits(Float32frombits(x)) == x.
Go input arguments: (f float32)
Go returns: uint32
Joker input arguments: [^Double f]
Joker returns: ^Number -
Float32frombits
Function v1.0(Float32frombits b)
Float32frombits returns the floating-point number corresponding
to the IEEE 754 binary representation b, with the sign bit of b
and the result in the same bit position.
Float32frombits(Float32bits(x)) == x.
Go input arguments: (b uint32)
Go returns: float32
Joker input arguments: [^Number b]
Joker returns: ^Double -
Float64bits
Function v1.0(Float64bits f)
Float64bits returns the IEEE 754 binary representation of f,
with the sign bit of f and the result in the same bit position,
and Float64bits(Float64frombits(x)) == x.
Go input arguments: (f float64)
Go returns: uint64
Joker input arguments: [^Double f]
Joker returns: ^Number -
Float64frombits
Function v1.0(Float64frombits b)
Float64frombits returns the floating-point number corresponding
to the IEEE 754 binary representation b, with the sign bit of b
and the result in the same bit position.
Float64frombits(Float64bits(x)) == x.
Go input arguments: (b uint64)
Go returns: float64
Joker input arguments: [^Number b]
Joker returns: ^Double -
Floor
Function v1.0(Floor x)
Floor returns the greatest integer value less than or equal to x.
Special cases are:
Floor(±0) = ±0
Floor(±Inf) = ±Inf
Floor(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Frexp
Function v1.0(Frexp f)
Frexp breaks f into a normalized fraction
and an integral power of two.
It returns frac and exp satisfying f == frac × 2**exp,
with the absolute value of frac in the interval [½, 1).
Special cases are:
Frexp(±0) = ±0, 0
Frexp(±Inf) = ±Inf, 0
Frexp(NaN) = NaN, 0
Go input arguments: (f float64)
Go returns: (frac float64, exp int)
Joker input arguments: [^Double f]
Joker returns: [^Double frac, ^Int exp] -
Gamma
Function v1.0(Gamma x)
Gamma returns the Gamma function of x.
Special cases are:
Gamma(+Inf) = +Inf
Gamma(+0) = +Inf
Gamma(-0) = -Inf
Gamma(x) = NaN for integer x < 0
Gamma(-Inf) = NaN
Gamma(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Hypot
Function v1.0(Hypot p q)
Hypot returns Sqrt(p*p + q*q), taking care to avoid
unnecessary overflow and underflow.
Special cases are:
Hypot(±Inf, q) = +Inf
Hypot(p, ±Inf) = +Inf
Hypot(NaN, q) = NaN
Hypot(p, NaN) = NaN
Go input arguments: (p float64, q float64)
Go returns: float64
Joker input arguments: [^Double p, ^Double q]
Joker returns: ^Double -
Ilogb
Function v1.0(Ilogb x)
Ilogb returns the binary exponent of x as an integer.
Special cases are:
Ilogb(±Inf) = MaxInt32
Ilogb(0) = MinInt32
Ilogb(NaN) = MaxInt32
Go input arguments: (x float64)
Go returns: int
Joker input arguments: [^Double x]
Joker returns: ^Int -
Inf
Function v1.0(Inf sign)
Inf returns positive infinity if sign >= 0, negative infinity if sign < 0.
Go input arguments: (sign int)
Go returns: float64
Joker input arguments: [^Int sign]
Joker returns: ^Double -
IsInf
Function v1.0(IsInf f sign)
IsInf reports whether f is an infinity, according to sign.
If sign > 0, IsInf reports whether f is positive infinity.
If sign < 0, IsInf reports whether f is negative infinity.
If sign == 0, IsInf reports whether f is either infinity.
Go input arguments: (f float64, sign int)
Go returns: bool
Joker input arguments: [^Double f, ^Int sign]
Joker returns: ^Boolean -
IsNaN
Function v1.0(IsNaN f)
IsNaN reports whether f is an IEEE 754 ``not-a-number'' value.
Go input arguments: (f float64)
Go returns: bool
Joker input arguments: [^Double f]
Joker returns: ^Boolean is -
J0
Function v1.0(J0 x)
J0 returns the order-zero Bessel function of the first kind.
Special cases are:
J0(±Inf) = 0
J0(0) = 1
J0(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
J1
Function v1.0(J1 x)
J1 returns the order-one Bessel function of the first kind.
Special cases are:
J1(±Inf) = 0
J1(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Jn
Function v1.0(Jn n x)
Jn returns the order-n Bessel function of the first kind.
Special cases are:
Jn(n, ±Inf) = 0
Jn(n, NaN) = NaN
Go input arguments: (n int, x float64)
Go returns: float64
Joker input arguments: [^Int n, ^Double x]
Joker returns: ^Double -
Ldexp
Function v1.0(Ldexp frac exp)
Ldexp is the inverse of Frexp.
It returns frac × 2**exp.
Special cases are:
Ldexp(±0, exp) = ±0
Ldexp(±Inf, exp) = ±Inf
Ldexp(NaN, exp) = NaN
Go input arguments: (frac float64, exp int)
Go returns: float64
Joker input arguments: [^Double frac, ^Int exp]
Joker returns: ^Double -
Lgamma
Function v1.0(Lgamma x)
Lgamma returns the natural logarithm and sign (-1 or +1) of Gamma(x).
Special cases are:
Lgamma(+Inf) = +Inf
Lgamma(0) = +Inf
Lgamma(-integer) = +Inf
Lgamma(-Inf) = -Inf
Lgamma(NaN) = NaN
Go input arguments: (x float64)
Go returns: (lgamma float64, sign int)
Joker input arguments: [^Double x]
Joker returns: [^Double lgamma, ^Int sign] -
Log
Function v1.0(Log x)
Log returns the natural logarithm of x.
Special cases are:
Log(+Inf) = +Inf
Log(0) = -Inf
Log(x < 0) = NaN
Log(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Log10
Function v1.0(Log10 x)
Log10 returns the decimal logarithm of x.
The special cases are the same as for Log.
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Log1p
Function v1.0(Log1p x)
Log1p 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
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Log2
Function v1.0(Log2 x)
Log2 returns the binary logarithm of x.
The special cases are the same as for Log.
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Logb
Function v1.0(Logb x)
Logb returns the binary exponent of x.
Special cases are:
Logb(±Inf) = +Inf
Logb(0) = -Inf
Logb(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Max
Function v1.0(Max x y)
Max returns the larger of x or y.
Special cases are:
Max(x, +Inf) = Max(+Inf, x) = +Inf
Max(x, NaN) = Max(NaN, x) = NaN
Max(+0, ±0) = Max(±0, +0) = +0
Max(-0, -0) = -0
Go input arguments: (x float64, y float64)
Go returns: float64
Joker input arguments: [^Double x, ^Double y]
Joker returns: ^Double -
Min
Function v1.0(Min x y)
Min returns the smaller of x or y.
Special cases are:
Min(x, -Inf) = Min(-Inf, x) = -Inf
Min(x, NaN) = Min(NaN, x) = NaN
Min(-0, ±0) = Min(±0, -0) = -0
Go input arguments: (x float64, y float64)
Go returns: float64
Joker input arguments: [^Double x, ^Double y]
Joker returns: ^Double -
Mod
Function v1.0(Mod x y)
Mod returns the floating-point remainder of x/y.
The magnitude of the result is less than y and its
sign agrees with that of x.
Special cases are:
Mod(±Inf, y) = NaN
Mod(NaN, y) = NaN
Mod(x, 0) = NaN
Mod(x, ±Inf) = x
Mod(x, NaN) = NaN
Go input arguments: (x float64, y float64)
Go returns: float64
Joker input arguments: [^Double x, ^Double y]
Joker returns: ^Double -
Modf
Function v1.0(Modf f)
Modf returns integer and fractional floating-point numbers
that sum to f. Both values have the same sign as f.
Special cases are:
Modf(±Inf) = ±Inf, NaN
Modf(NaN) = NaN, NaN
Go input arguments: (f float64)
Go returns: (int float64, frac float64)
Joker input arguments: [^Double f]
Joker returns: [^Double int, ^Double frac] -
NaN
Function v1.0(NaN)
NaN returns an IEEE 754 ``not-a-number'' value.
Go returns: float64
Joker input arguments: []
Joker returns: ^Double -
Nextafter
Function v1.0(Nextafter x y)
Nextafter returns the next representable float64 value after x towards y.
Special cases are:
Nextafter(x, x) = x
Nextafter(NaN, y) = NaN
Nextafter(x, NaN) = NaN
Go input arguments: (x float64, y float64)
Go returns: float64
Joker input arguments: [^Double x, ^Double y]
Joker returns: ^Double r -
Nextafter32
Function v1.0(Nextafter32 x y)
Nextafter32 returns the next representable float32 value after x towards y.
Special cases are:
Nextafter32(x, x) = x
Nextafter32(NaN, y) = NaN
Nextafter32(x, NaN) = NaN
Go input arguments: (x float32, y float32)
Go returns: float32
Joker input arguments: [^Double x, ^Double y]
Joker returns: ^Double r -
Pow
Function v1.0(Pow x y)
Pow returns x**y, the base-x exponential of y.
Special cases are (in order):
Pow(x, ±0) = 1 for any x
Pow(1, y) = 1 for any y
Pow(x, 1) = x for any x
Pow(NaN, y) = NaN
Pow(x, NaN) = NaN
Pow(±0, y) = ±Inf for y an odd integer < 0
Pow(±0, -Inf) = +Inf
Pow(±0, +Inf) = +0
Pow(±0, y) = +Inf for finite y < 0 and not an odd integer
Pow(±0, y) = ±0 for y an odd integer > 0
Pow(±0, y) = +0 for finite y > 0 and not an odd integer
Pow(-1, ±Inf) = 1
Pow(x, +Inf) = +Inf for |x| > 1
Pow(x, -Inf) = +0 for |x| > 1
Pow(x, +Inf) = +0 for |x| < 1
Pow(x, -Inf) = +Inf for |x| < 1
Pow(+Inf, y) = +Inf for y > 0
Pow(+Inf, y) = +0 for y < 0
Pow(-Inf, y) = Pow(-0, -y)
Pow(x, y) = NaN for finite x < 0 and finite non-integer y
Go input arguments: (x float64, y float64)
Go returns: float64
Joker input arguments: [^Double x, ^Double y]
Joker returns: ^Double -
Pow10
Function v1.0(Pow10 n)
Pow10 returns 10**n, the base-10 exponential of n.
Special cases are:
Pow10(n) = 0 for n < -323
Pow10(n) = +Inf for n > 308
Go input arguments: (n int)
Go returns: float64
Joker input arguments: [^Int n]
Joker returns: ^Double -
Remainder
Function v1.0(Remainder x y)
Remainder returns the IEEE 754 floating-point remainder of x/y.
Special cases are:
Remainder(±Inf, y) = NaN
Remainder(NaN, y) = NaN
Remainder(x, 0) = NaN
Remainder(x, ±Inf) = x
Remainder(x, NaN) = NaN
Go input arguments: (x float64, y float64)
Go returns: float64
Joker input arguments: [^Double x, ^Double y]
Joker returns: ^Double -
Round
Function v1.0(Round x)
Round returns the nearest integer, rounding half away from zero.
Special cases are:
Round(±0) = ±0
Round(±Inf) = ±Inf
Round(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
RoundToEven
Function v1.0(RoundToEven x)
RoundToEven returns the nearest integer, rounding ties to even.
Special cases are:
RoundToEven(±0) = ±0
RoundToEven(±Inf) = ±Inf
RoundToEven(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Signbit
Function v1.0(Signbit x)
Signbit reports whether x is negative or negative zero.
Go input arguments: (x float64)
Go returns: bool
Joker input arguments: [^Double x]
Joker returns: ^Boolean -
Sin
Function v1.0(Sin x)
Sin returns the sine of the radian argument x.
Special cases are:
Sin(±0) = ±0
Sin(±Inf) = NaN
Sin(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Sincos
Function v1.0(Sincos x)
Sincos returns Sin(x), Cos(x).
Special cases are:
Sincos(±0) = ±0, 1
Sincos(±Inf) = NaN, NaN
Sincos(NaN) = NaN, NaN
Go input arguments: (x float64)
Go returns: (sin float64, cos float64)
Joker input arguments: [^Double x]
Joker returns: [^Double sin, ^Double cos] -
Sinh
Function v1.0(Sinh x)
Sinh returns the hyperbolic sine of x.
Special cases are:
Sinh(±0) = ±0
Sinh(±Inf) = ±Inf
Sinh(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Sqrt
Function v1.0(Sqrt x)
Sqrt returns the square root of x.
Special cases are:
Sqrt(+Inf) = +Inf
Sqrt(±0) = ±0
Sqrt(x < 0) = NaN
Sqrt(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Tan
Function v1.0(Tan x)
Tan returns the tangent of the radian argument x.
Special cases are:
Tan(±0) = ±0
Tan(±Inf) = NaN
Tan(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Tanh
Function v1.0(Tanh x)
Tanh returns the hyperbolic tangent of x.
Special cases are:
Tanh(±0) = ±0
Tanh(±Inf) = ±1
Tanh(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Trunc
Function v1.0(Trunc x)
Trunc returns the integer value of x.
Special cases are:
Trunc(±0) = ±0
Trunc(±Inf) = ±Inf
Trunc(NaN) = NaN
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Y0
Function v1.0(Y0 x)
Y0 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
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Y1
Function v1.0(Y1 x)
Y1 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
Go input arguments: (x float64)
Go returns: float64
Joker input arguments: [^Double x]
Joker returns: ^Double -
Yn
Function v1.0(Yn n x)
Yn 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
Go input arguments: (n int, x float64)
Go returns: float64
Joker input arguments: [^Int n, ^Double x]
Joker returns: ^Double
Types
-
(None.)