math

package
v1.0.5003 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ceil

func Ceil(n *big.Rat) *big.Int

func Contains added in v1.0.5003

func Contains[T Ordered](items []T, item T) bool

Contains

func E

func E(rounds uint) *big.Rat

func Floor

func Floor(n *big.Rat) *big.Int

func Mask

func Mask(s uint) *big.Int

func Max added in v1.0.5003

func Max[T IntegerFloat](a, b T) T

func Min added in v1.0.5003

func Min[T IntegerFloat](a, b T) T

func Odd

func Odd(n *big.Int) *big.Int

func Phi

func Phi(precision uint) *big.Rat

func RotateLeft

func RotateLeft(x *big.Int, r uint, s uint, mask *big.Int) *big.Int

func RotateRight

func RotateRight(i *big.Int, r uint, s uint, mask *big.Int) *big.Int

func Round

func Round(n *big.Rat) *big.Int

func Sqrt

func Sqrt(n uint64, p uint) *big.Rat

func Sum added in v1.0.5003

func Sum[T MathInteger](s ...T) (sum T)

Sum

Types

type Complex added in v1.0.5003

type Complex interface {
	~complex64 | ~complex128
}

type Float added in v1.0.5003

type Float interface {
	~float32 | ~float64
}

type Integer added in v1.0.5003

type Integer interface {
	Signed | Unsigned
}

type IntegerFloat added in v1.0.5003

type IntegerFloat interface {
	Integer | Float
}

type MathInteger added in v1.0.5003

type MathInteger interface {
	Integer | Float | Complex
}

type Ordered added in v1.0.5003

type Ordered interface {
	Integer | Float | ~string
}

type Signed added in v1.0.5003

type Signed interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64
}

type Unsigned added in v1.0.5003

type Unsigned interface {
	~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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