math

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OneBigInt = big.NewInt(1)
	MinBigInt = minBigInt()
	MaxBigInt = maxBigInt()
)

Functions

func FloorDiv

func FloorDiv(x, y int64) int64

func FloorDivBigInt added in v0.9.0

func FloorDivBigInt(x, y *big.Int) *big.Int

func Fraction

func Fraction(value, numerator, denominator int64) (int64, error)

func Log

func Log(base, exponent int64, baseScale, exponentScale, resultScale int, mode decimal.RoundingMode) (int64, error)

func LogBigInt added in v0.9.0

func LogBigInt(base, exponent *big.Int, baseScale, exponentScale, resultScale int, mode decimal.RoundingMode) (*big.Int, error)

func ModDivision

func ModDivision(x, y int64) int64

func PowBigInt added in v0.9.0

func PowBigInt(base, exponent *big.Int, baseScale, exponentScale, resultScale int, mode decimal.RoundingMode) (*big.Int, error)

func PowV1 added in v0.10.0

func PowV1(base, exponent int64, baseScale, exponentScale, resultScale int, mode decimal.RoundingMode) (int64, error)

func PowV2 added in v0.10.0

func PowV2(base, exponent int64, baseScale, exponentScale, resultScale int, mode decimal.RoundingMode) (int64, error)

func Sqrt added in v0.10.0

func Sqrt(number int64, numberScale, resultScale int, mode decimal.RoundingMode) (int64, error)

func SqrtBigInt added in v0.10.0

func SqrtBigInt(number *big.Int, numberScale, resultScale int, mode decimal.RoundingMode) (*big.Int, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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