package
1.24.4
Repository: https://pkg.go.dev/std
Documentation: pkg.go.dev

# Packages

Package big implements arbitrary-precision arithmetic (big numbers).
Package bits implements bit counting and manipulation functions for the predeclared unsigned integer types.
Package cmplx provides basic constants and mathematical functions for complex numbers.
Package rand implements pseudo-random number generators suitable for tasks such as simulation, but it should not be used for security-sensitive work.

# Functions

Abs returns the absolute value of x.
Acos returns the arccosine, in radians, of x.
Acosh returns the inverse hyperbolic cosine of x.
Asin returns the arcsine, in radians, of x.
Asinh returns the inverse hyperbolic sine of x.
Atan returns the arctangent, in radians, of x.
Atan2 returns the arc tangent of y/x, using the signs of the two to determine the quadrant of the return value.
Atanh returns the inverse hyperbolic tangent of x.
Cbrt returns the cube root of x.
Ceil returns the least integer value greater than or equal to x.
Copysign returns a value with the magnitude of f and the sign of sign.
Cos returns the cosine of the radian argument x.
Cosh returns the hyperbolic cosine of x.
Dim returns the maximum of x-y or 0.
Erf returns the error function of x.
Erfc returns the complementary error function of x.
Erfcinv returns the inverse of [Erfc](x).
Erfinv returns the inverse error function of x.
Exp returns e**x, the base-e exponential of x.
Exp2 returns 2**x, the base-2 exponential of x.
Expm1 returns e**x - 1, the base-e exponential of x minus 1.
Float32bits returns the IEEE 754 binary representation of f, with the sign bit of f and the result in the same bit position.
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.
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.
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.
Floor returns the greatest integer value less than or equal to x.
FMA returns x * y + z, computed with only one rounding.
Frexp breaks f into a normalized fraction and an integral power of two.
Gamma returns the Gamma function of x.
Hypot returns [Sqrt](p*p + q*q), taking care to avoid unnecessary overflow and underflow.
Ilogb returns the binary exponent of x as an integer.
Inf returns positive infinity if sign >= 0, negative infinity if sign < 0.
IsInf reports whether f is an infinity, according to sign.
IsNaN reports whether f is an IEEE 754 “not-a-number” value.
J0 returns the order-zero Bessel function of the first kind.
J1 returns the order-one Bessel function of the first kind.
Jn returns the order-n Bessel function of the first kind.
Ldexp is the inverse of [Frexp].
Lgamma returns the natural logarithm and sign (-1 or +1) of [Gamma](x).
Log returns the natural logarithm of x.
Log10 returns the decimal logarithm of x.
Log1p returns the natural logarithm of 1 plus its argument x.
Log2 returns the binary logarithm of x.
Logb returns the binary exponent of x.
Max returns the larger of x or y.
Min returns the smaller of x or y.
Mod returns the floating-point remainder of x/y.
Modf returns integer and fractional floating-point numbers that sum to f.
NaN returns an IEEE 754 “not-a-number” value.
Nextafter returns the next representable float64 value after x towards y.
Nextafter32 returns the next representable float32 value after x towards y.
Pow returns x**y, the base-x exponential of y.
Pow10 returns 10**n, the base-10 exponential of n.
Remainder returns the IEEE 754 floating-point remainder of x/y.
Round returns the nearest integer, rounding half away from zero.
RoundToEven returns the nearest integer, rounding ties to even.
Signbit reports whether x is negative or negative zero.
Sin returns the sine of the radian argument x.
Sincos returns Sin(x), Cos(x).
Sinh returns the hyperbolic sine of x.
Sqrt returns the square root of x.
Tan returns the tangent of the radian argument x.
Tanh returns the hyperbolic tangent of x.
Trunc returns the integer value of x.
Y0 returns the order-zero Bessel function of the second kind.
Y1 returns the order-one Bessel function of the second kind.
Yn returns the order-n Bessel function of the second kind.

# Constants

https://oeis.org/A001113.
https://oeis.org/A002392.
https://oeis.org/A002162.
Mathematical constants.
Mathematical constants.
3.40282346638528859811704183484516925440e+38.
1.79769313486231570814527423731704356798070e+308.
MaxInt32 or MaxInt64 depending on intSize.
32767.
2147483647.
9223372036854775807.
127.
MaxUint32 or MaxUint64 depending on intSize.
65535.
4294967295.
18446744073709551615.
255.
MinInt32 or MinInt64 depending on intSize.
-32768.
-2147483648.
-9223372036854775808.
-128.
https://oeis.org/A001622.
https://oeis.org/A000796.
1.401298464324817070923729583289916131280e-45.
4.9406564584124654417656879286822137236505980e-324.
https://oeis.org/A002193.
https://oeis.org/A019774.
https://oeis.org/A139339.
https://oeis.org/A002161.