coremath

package
v0.0.0-...-48fa796 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName is the prefix given to all the functions in this module.
	ModuleName = "math"
)

Variables

This section is empty.

Functions

func Mod

func Mod(input []types.Value) (types.Value, error)

Mod returns mod(x, y), the remainder of x/y. The two values must be either both of KindInt or both of KindFloat, and it will return the same kind. If you pass in a divisor of zero, this will error, eg: mod(x, 0) = NaN. TODO: consider returning zero instead of erroring?

func Pow

func Pow(input []types.Value) (types.Value, error)

Pow returns x ^ y, the base-x exponential of y.

func Sqrt

func Sqrt(input []types.Value) (types.Value, error)

Sqrt returns sqrt(x), the square root of x.

Types

This section is empty.

Jump to

Keyboard shortcuts

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