mathx

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 2 Imported by: 5

README

mathx

The generic encapsulation of the standard math library in golang.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs[T Numeric](x T) T

func Acos

func Acos[T Numeric](x T) T

func Acosh

func Acosh[T Numeric](x T) T

func Asin

func Asin[T Numeric](x T) T

func Asinh

func Asinh[T Numeric](x T) T

func Atan

func Atan[T Numeric](x T) T

func Atan2

func Atan2[T Numeric](x, y T) T

func Atanh

func Atanh[T Numeric](x T) T

func Cbrt

func Cbrt[T Numeric](x T) T

func Ceil

func Ceil[T Numeric](x T) T

func Copysign

func Copysign[F Numeric, S Numeric](f F, sign S) F

func Cos

func Cos[T Numeric](x T) T

func Cosh

func Cosh[T Numeric](x T) T

func Dim

func Dim[T Numeric](x, y T) T

func Erf

func Erf[T Numeric](x T) T

func Erfc

func Erfc[T Numeric](x T) T

func Erfcinv

func Erfcinv[T Numeric](x T) T

func Erfinv

func Erfinv[T Numeric](x T) T

func Exp

func Exp[T Numeric](x T) T

func Exp2

func Exp2[T Numeric](x T) T

func Expm1

func Expm1[T Numeric](x T) T

func FMA

func FMA[T Numeric](x, y, z T) T

func Floor

func Floor[T Numeric](x T) T

func Frexp

func Frexp[T Numeric](f T) (int, frac T)

func Gamma

func Gamma[T Numeric](x T) T

func Hypot

func Hypot[T Numeric](p, q T) T

func Ilogb

func Ilogb[T Numeric](x T) int

func Inf

func Inf[T Numeric, S Integer](sign S) T

func IsInf

func IsInf[T Float, S Integer](x T, sign S) bool

func IsNaN

func IsNaN[T Float](x T) bool

func J0

func J0[T Numeric](x T) T

func J1

func J1[T Numeric](x T) T

func Jn

func Jn[N Integer, T Numeric](n N, x T) T

func Ldexp

func Ldexp[T Numeric, E Integer](frac T, exp E) T

func Lgamma

func Lgamma[T Numeric](x T) (lgama T, sign int)

func Log

func Log[T Numeric](x T) T

func Log1p

func Log1p[T Numeric](x T) T

func Log2

func Log2[T Numeric](x T) T

func Log10

func Log10[T Numeric](x T) T

func Logb

func Logb[T Numeric](x T) T

func Mod

func Mod[T Numeric](x, y T) T

func Modf

func Modf[T Numeric](x T) (int, frac T)

func NaN

func NaN[T Numeric]() T

func NextAfter

func NextAfter[T Numeric](x, y T) T

func Pow

func Pow[T Numeric](x, y T) T

func Remainder

func Remainder[T Numeric](x, y T) T

func Round

func Round[T Numeric](x T) T

func RoundToEven

func RoundToEven[T Numeric](x T) T

func Sin

func Sin[T Numeric](x T) T

func SinCos

func SinCos[T Numeric](x T) (sin, cos T)

func Sinh

func Sinh[T Numeric](x T) T

func Sqrt

func Sqrt[T Numeric](x T) T

func Tan

func Tan[T Numeric](x T) T

func Tanh

func Tanh[T Numeric](x T) T

func Trunc

func Trunc[T Numeric](x T) T

func Y0

func Y0[T Numeric](x T) T

func Y1

func Y1[T Numeric](x T) T

func Yn

func Yn[N Integer, T Numeric](n N, x T) T

Types

type Float

type Float interface {
	~float32 | ~float64
}

type Integer

type Integer interface {
	~int8 | ~int16 | ~int32 | ~int64 | ~int | ~uint8 | ~uint16 | ~uint32 | ~uint64
}

type Numeric

type Numeric interface {
	Integer | Float
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL