This is a creation in Article, where the information may have evolved or changed.
Go source reading notes (MATH.4)
Reference Godoc API
API List
Func NaN () float64
The function returns an IEEE 754 "This is not a number" value.
Func IsNaN (f float64) (is bool)
Determine if f is a Nan value
Func Inf (sign int) float64
Returns a negative infinity if sign>=0 returns positive infinity
Func Isinf (f float64, sign int) bool
Determine if it is an infinite number
Func float32bits (f float32) UInt32
The function returns the 4-byte unsigned integer that corresponds to the value of the IEEE 754 format binary representation of the floating-point number F (the value is the same for each bit ). It is mainly used for bit operations and the like, to convert to unsigned integers, so that it does not use floating-point arithmetic, fast
Func float32frombits (b uint32) float32
Converts a 4-byte unsigned integer to a float32 value with each bit invariant, corresponding to the Float32bits
Func float64bits (f float64) UInt64
Similar to Float32bits
Func float64frombits (b uint64) float64
Similar to Float32frombits
Func signbit (x float64) bool
funcfloat64bool { return Float64bits(x)&(1<<63) != 0}
Returns True if X is negative or negative 0 ( a representation of 0 )
Func copysign (x, y float64) float64
// Copysign returns a value with the magnitude// of x and the sign of y.func Copysign(x, y float64) float64 { constsign163 return Float64frombits(Float64bits(x)&^sign | Float64bits(y)&sign)}
Returns a floating-point number that has the magnitude (absolute value) of X and the flag bit (sign) of Y.
Func ceil (x float64) float64
Returns the smallest integer not less than x (floating-point value)
Special value Scenarios
Ceil(±0) = ±0Ceil(±Inf) = ±InfCeil(NaNNaN
Func floor (x float64) float64
Returns the smallest integer less than x (floating-point value)
Special value Scenarios
Floor(±0) = ±0Floor(±Inf) = ±InfFloor(NaNNaN
Func Trunc (x float64) float64
Returns the integer portion of x (floating-point type)
Special value Scenarios
Trunc(±0) = ±0Trunc(±Inf) = ±InfTrunc(NaNNaN
Func modf (f float64) (int float64, frac float64)
Returns the integer and fractional parts of F, with the same sign and X, for example 1.1 returns 1.0 and 0.1,-1.1 returns-1.0 and 0.1
Special value Scenarios
Modf(±Inf) = ±InfNaNModf(NaNNaNNaN
It's too late today, the next time.
Func nextafter (x, y float64) (R float64)
Func Abs (x float64) float64
Func Max (x, y float64) float64
Func Min (x, y float64) float64
Func Dim (x, y float64) float64
Func Mod (x, y float64) float64
Func remainder (x, y float64) float64
Func Sqrt (x float64) float64
Func CBRT (x float64) float64
Func Hypot (p, q float64) float64
Func Sin (x float64) float64
Func Cos (x float64) float64
Func Tan (x float64) float64
Func sincos (x float64) (sin, cos float64)
Func Asin (x float64) float64
Func Acos (x float64) float64
Func Atan (x float64) float64
Func Atan2 (y, x float64) float64
Func Sinh (x float64) float64
Func Cosh (x float64) float64
Func Tanh (x float64) float64
Func Asinh (x float64) float64
Func Acosh (x float64) float64
Func Atanh (x float64) float64
Func Log (x float64) float64
Func log1p (x float64) float64
Func Log2 (x float64) float64
Func Log10 (x float64) float64
Func logb (x float64) float64
Func ilogb (x float64) int
Func frexp (f float64) (Frac float64, exp int)
Func ldexp (frac float64, exp int) float64
Func Exp (x float64) float64
Func Expm1 (x float64) float64
Func Exp2 (x float64) float64
Func Pow (x, y float64) float64
Func POW10 (e int) float64
Func Gamma (x float64) float64
Func lgamma (x float64) (Lgamma float64, sign int)
Func Erf (x float64) float64
Func Erfc (x float64) float64
Func J0 (x float64) float64
Func J1 (x float64) float64
Func Jn (n int, x float64) float64
Func Y0 (x float64) float64
Func Y1 (x float64) float64
Func Yn (n int, x float64) float64