math

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: ISC Imports: 5 Imported by: 1

README

The Goal extension package math provides extra math functionality.

Documentation

Overview

Package math provides a convenient way to register extra standard math functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HelpFunc added in v1.6.0

func HelpFunc() func(string) string

HelpFunc returns a help function suitable for help.Wrap.

func Import

func Import(ctx *goal.Context, pfx string)

Import registers in the given Context math variadic functions with standard names and given prefix and stores them into global variables. Prefix "math" is recommended, to avoid naming conflicts.

The defined math functions are (monadic) acos, acosh, asin, asinh, atanh, cbrt, cosh, erf, erfc, erfcinv, erfinv, exp2, expm1, gamma, log2, log10, log1p, logb, sinh, tan, tanh, trunc, (dyadic) jn, yn (defaulting to order-zero for monadic case).

mmax[i;I|N] i-item moving maximums (|\ for i first items) mmin[i;I|N] i-item moving minimums (&\ for i first items) mmu[N;N] matrix multiplication or dot product (experimental)

mmu accepts vector (N) and matrix (A) arguments. Works on floats, but currently converts any integers if necessary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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