math
import "math"
Package math provides basic constants and mathematical functions. This package does not guarantee bit-identical results across architectures.
Go 1.26.1
Constants
const ( E = 2.71828182845904523536028747135266249775724709369995957496696763 // https://oeis.org/A001113 Pi = 3.14159265358979323846264338327950288419716939937510582097494459 // https://oeis.o...
Mathematical constants.
math/const.go:12
const ( E = 2.71828182845904523536028747135266249775724709369995957496696763 // https://oeis.org/A001113 Pi = 3.14159265358979323846264338327950288419716939937510582097494459 // https://oeis.o...
Mathematical constants.
math/const.go:23
const ( E = 2.71828182845904523536028747135266249775724709369995957496696763 // https://oeis.org/A001113 Pi = 3.14159265358979323846264338327950288419716939937510582097494459 // https://oeis.o...
Mathematical constants.
math/const.go:21
const ( E = 2.71828182845904523536028747135266249775724709369995957496696763 // https://oeis.org/A001113 Pi = 3.14159265358979323846264338327950288419716939937510582097494459 // https://oeis.o...
Mathematical constants.
math/const.go:24
const ( E = 2.71828182845904523536028747135266249775724709369995957496696763 // https://oeis.org/A001113 Pi = 3.14159265358979323846264338327950288419716939937510582097494459 // https://oeis.o...
Mathematical constants.
math/const.go:22
const ( MaxFloat32 = 0x1p127 * (1 + (1 - 0x1p-23)) // 3.40282346638528859811704183484516925440e+38 SmallestNonzeroFloat32 = 0x1p-126 * 0x1p-23 // 1.401298464324817070923729...
Floating-point limit values. Max is the largest finite value representable by the type. SmallestNonzero is the smallest positive, non-zero value representable by the type.
math/const.go:31
const ( MaxFloat32 = 0x1p127 * (1 + (1 - 0x1p-23)) // 3.40282346638528859811704183484516925440e+38 SmallestNonzeroFloat32 = 0x1p-126 * 0x1p-23 // 1.401298464324817070923729...
Floating-point limit values. Max is the largest finite value representable by the type. SmallestNonzero is the smallest positive, non-zero value representable by the type.
math/const.go:34
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:42
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:46
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:48
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:50
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:44
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:52
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:54
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:55
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:56
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:53
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:43
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:47
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:49
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:51
const ( MaxInt = 1<<(intSize-1) - 1 // MaxInt32 or MaxInt64 depending on intSize. MinInt = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize. MaxInt8 = 1<<7 - 1 ...
Integer limit values.
math/const.go:45
const ( E = 2.71828182845904523536028747135266249775724709369995957496696763 // https://oeis.org/A001113 Pi = 3.14159265358979323846264338327950288419716939937510582097494459 // https://oeis.o...
Mathematical constants.
math/const.go:14
const ( E = 2.71828182845904523536028747135266249775724709369995957496696763 // https://oeis.org/A001113 Pi = 3.14159265358979323846264338327950288419716939937510582097494459 // https://oeis.o...
Mathematical constants.
math/const.go:13
const ( MaxFloat32 = 0x1p127 * (1 + (1 - 0x1p-23)) // 3.40282346638528859811704183484516925440e+38 SmallestNonzeroFloat32 = 0x1p-126 * 0x1p-23 // 1.401298464324817070923729...
Floating-point limit values. Max is the largest finite value representable by the type. SmallestNonzero is the smallest positive, non-zero value representable by the type.
math/const.go:32
const ( MaxFloat32 = 0x1p127 * (1 + (1 - 0x1p-23)) // 3.40282346638528859811704183484516925440e+38 SmallestNonzeroFloat32 = 0x1p-126 * 0x1p-23 // 1.401298464324817070923729...
Floating-point limit values. Max is the largest finite value representable by the type. SmallestNonzero is the smallest positive, non-zero value representable by the type.
math/const.go:35
const ( E = 2.71828182845904523536028747135266249775724709369995957496696763 // https://oeis.org/A001113 Pi = 3.14159265358979323846264338327950288419716939937510582097494459 // https://oeis.o...
Mathematical constants.
math/const.go:16
const ( E = 2.71828182845904523536028747135266249775724709369995957496696763 // https://oeis.org/A001113 Pi = 3.14159265358979323846264338327950288419716939937510582097494459 // https://oeis.o...
Mathematical constants.
math/const.go:17
const ( E = 2.71828182845904523536028747135266249775724709369995957496696763 // https://oeis.org/A001113 Pi = 3.14159265358979323846264338327950288419716939937510582097494459 // https://oeis.o...
Mathematical constants.
math/const.go:19
const ( E = 2.71828182845904523536028747135266249775724709369995957496696763 // https://oeis.org/A001113 Pi = 3.14159265358979323846264338327950288419716939937510582097494459 // https://oeis.o...
Mathematical constants.
math/const.go:18
Functions
func Abs(x float64) float64
Abs returns the absolute value of x. Special cases are: Abs(±Inf) = +Inf Abs(NaN) = NaN
math/abs.go:13
func Acos(x float64) float64
Acos returns the arccosine, in radians, of x. Special case is: Acos(x) = NaN if x < -1 or x > 1
math/asin.go:58
func Acosh(x float64) float64
Acosh returns the inverse hyperbolic cosine of x. Special cases are: Acosh(+Inf) = +Inf Acosh(x) = NaN if x < 1 Acosh(NaN) = NaN
math/acosh.go:43
func Asin(x float64) float64
Asin returns the arcsine, in radians, of x. Special cases are: Asin(±0) = ±0 Asin(x) = NaN if x < -1 or x > 1
math/asin.go:20
func Asinh(x float64) float64
Asinh returns the inverse hyperbolic sine of x. Special cases are: Asinh(±0) = ±0 Asinh(±Inf) = ±Inf Asinh(NaN) = NaN
math/asinh.go:40
func Atan(x float64) float64
Atan returns the arctangent, in radians, of x. Special cases are: Atan(±0) = ±0 Atan(±Inf) = ±Pi/2
math/atan.go:96
func Atan2(y float64, x float64) float64
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) = ...
math/atan2.go:30
func Atanh(x float64) float64
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
math/atanh.go:48
func Cbrt(x float64) float64
Cbrt returns the cube root of x. Special cases are: Cbrt(±0) = ±0 Cbrt(±Inf) = ±Inf Cbrt(NaN) = NaN
math/cbrt.go:26
func Ceil(x float64) float64
Ceil returns the least integer value greater than or equal to x. Special cases are: Ceil(±0) = ±0 Ceil(±Inf) = ±Inf Ceil(NaN) = NaN
math/floor.go:43
func Copysign(f float64, sign float64) float64
Copysign returns a value with the magnitude of f and the sign of sign.
math/copysign.go:9
func Cos(x float64) float64
Cos returns the cosine of the radian argument x. Special cases are: Cos(±Inf) = NaN Cos(NaN) = NaN
math/sin.go:118
func Cosh(x float64) float64
Cosh returns the hyperbolic cosine of x. Special cases are: Cosh(±0) = 1 Cosh(±Inf) = +Inf Cosh(NaN) = NaN
math/sinh.go:79
func Dim(x float64, y float64) float64
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
math/dim.go:14
func Erf(x float64) float64
Erf returns the error function of x. Special cases are: Erf(+Inf) = 1 Erf(-Inf) = -1 Erf(NaN) = NaN
math/erf.go:189
func Erfc(x float64) float64
Erfc returns the complementary error function of x. Special cases are: Erfc(+Inf) = 0 Erfc(-Inf) = 2 Erfc(NaN) = NaN
math/erf.go:274
func Erfcinv(x float64) float64
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
math/erfinv.go:127
func Erfinv(x float64) float64
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
math/erfinv.go:77
func Exp(x float64) float64
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.
math/exp.go:16
func Exp2(x float64) float64
Exp2 returns 2**x, the base-2 exponential of x. Special cases are the same as [Exp].
math/exp.go:140
func Expm1(x float64) float64
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.
math/expm1.go:126
func Float32bits(f float32) uint32
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.
math/unsafe.go:24
func Float32frombits(b uint32) float32
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.
math/unsafe.go:30
func Float64bits(f float64) uint64
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.
math/unsafe.go:35
func Float64frombits(b uint64) float64
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.
math/unsafe.go:41
func Floor(x float64) float64
Floor returns the greatest integer value less than or equal to x. Special cases are: Floor(±0) = ±0 Floor(±Inf) = ±Inf Floor(NaN) = NaN
math/floor.go:14
func FMA(x float64, y float64, z float64) float64
FMA returns x * y + z, computed with only one rounding. (That is, FMA returns the fused multiply-add of x, y, and z.)
math/fma.go:95
func Frexp(f float64) (float64, int)
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
math/frexp.go:17
func Gamma(x float64) float64
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
math/gamma.go:131
func Hypot(p float64, q float64) float64
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
math/hypot.go:20
func Ilogb(x float64) int
Ilogb returns the binary exponent of x as an integer. Special cases are: Ilogb(±Inf) = MaxInt32 Ilogb(0) = MinInt32 Ilogb(NaN) = MaxInt32
math/logb.go:34
func Inf(sign int) float64
Inf returns positive infinity if sign >= 0, negative infinity if sign < 0.
math/bits.go:20
func IsInf(f float64, sign int) bool
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.
math/bits.go:46
func IsNaN(f float64) bool
IsNaN reports whether f is an IEEE 754 “not-a-number” value.
math/bits.go:34
func J0(x float64) float64
J0 returns the order-zero Bessel function of the first kind. Special cases are: J0(±Inf) = 0 J0(0) = 1 J0(NaN) = NaN
math/j0.go:77
func J1(x float64) float64
J1 returns the order-one Bessel function of the first kind. Special cases are: J1(±Inf) = 0 J1(NaN) = NaN
math/j1.go:75
func Jn(n int, x float64) float64
Jn returns the order-n Bessel function of the first kind. Special cases are: Jn(n, ±Inf) = 0 Jn(n, NaN) = NaN
math/jn.go:54
func Ldexp(frac float64, exp int) float64
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
math/ldexp.go:15
func Lgamma(x float64) (float64, int)
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
math/lgamma.go:175
func Log(x float64) float64
Log returns the natural logarithm of x. Special cases are: Log(+Inf) = +Inf Log(0) = -Inf Log(x < 0) = NaN Log(NaN) = NaN
math/log.go:81
func Log10(x float64) float64
Log10 returns the decimal logarithm of x. The special cases are the same as for [Log].
math/log10.go:9
func Log1p(x float64) float64
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
math/log1p.go:96
func Log2(x float64) float64
Log2 returns the binary logarithm of x. The special cases are the same as for [Log].
math/log10.go:22
func Logb(x float64) float64
Logb returns the binary exponent of x. Special cases are: Logb(±Inf) = +Inf Logb(0) = -Inf Logb(NaN) = NaN
math/logb.go:14
func Max(x float64, y float64) float64
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 Note that this differs from the built-in function max when called with NaN and +Inf.
math/dim.go:40
func Min(x float64, y float64) float64
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 Note that this differs from the built-in function min when called with NaN and -Inf.
math/dim.go:76
func Mod(x float64, y float64) float64
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
math/mod.go:22
func Modf(f float64) (float64, float64)
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
math/modf.go:14
func NaN() float64
NaN returns an IEEE 754 “not-a-number” value.
math/bits.go:31
func Nextafter(x float64, y float64) float64
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
math/nextafter.go:37
func Nextafter32(x float32, y float32) float32
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
math/nextafter.go:14
func Pow(x float64, y float64) float64
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| > ...
math/pow.go:48
func Pow10(n int) float64
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
math/pow10.go:31
func Remainder(x float64, y float64) float64
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
math/remainder.go:38
func Round(x float64) float64
Round returns the nearest integer, rounding half away from zero. Special cases are: Round(±0) = ±0 Round(±Inf) = ±Inf Round(NaN) = NaN
math/floor.go:90
func RoundToEven(x float64) float64
RoundToEven returns the nearest integer, rounding ties to even. Special cases are: RoundToEven(±0) = ±0 RoundToEven(±Inf) = ±Inf RoundToEven(NaN) = NaN
math/floor.go:128
func Signbit(x float64) bool
Signbit reports whether x is negative or negative zero.
math/signbit.go:8
func Sin(x float64) float64
Sin returns the sine of the radian argument x. Special cases are: Sin(±0) = ±0 Sin(±Inf) = NaN Sin(NaN) = NaN
math/sin.go:185
func Sincos(x float64) float64
Sincos returns Sin(x), Cos(x). Special cases are: Sincos(±0) = ±0, 1 Sincos(±Inf) = NaN, NaN Sincos(NaN) = NaN, NaN
math/sincos.go:16
func Sinh(x float64) float64
Sinh returns the hyperbolic sine of x. Special cases are: Sinh(±0) = ±0 Sinh(±Inf) = ±Inf Sinh(NaN) = NaN
math/sinh.go:26
func Sqrt(x float64) float64
Sqrt returns the square root of x. Special cases are: Sqrt(+Inf) = +Inf Sqrt(±0) = ±0 Sqrt(x < 0) = NaN Sqrt(NaN) = NaN
math/sqrt.go:93
func Tan(x float64) float64
Tan returns the tangent of the radian argument x. Special cases are: Tan(±0) = ±0 Tan(±Inf) = NaN Tan(NaN) = NaN
math/tan.go:83
func Tanh(x float64) float64
Tanh returns the hyperbolic tangent of x. Special cases are: Tanh(±0) = ±0 Tanh(±Inf) = ±1 Tanh(NaN) = NaN
math/tanh.go:75
func Trunc(x float64) float64
Trunc returns the integer value of x. Special cases are: Trunc(±0) = ±0 Trunc(±Inf) = ±Inf Trunc(NaN) = NaN
math/floor.go:61
func Y0(x float64) float64
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
math/j0.go:156
func Y1(x float64) float64
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
math/j1.go:156
func Yn(n int, x float64) float64
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
math/jn.go:235