f64d4eval

package
v1.67.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Absolute

func Absolute(e *eval.Evaluator, arguments string) (interface{}, error)

Absolute returns the absolute value of its argument.

func Add

func Add(left, right interface{}) (interface{}, error)

Add + (addition)

func AddUnary

func AddUnary(arg interface{}) (interface{}, error)

AddUnary + (plus)

func And

func And(left, right interface{}) (interface{}, error)

And &&

func Base2Exponential

func Base2Exponential(e *eval.Evaluator, arguments string) (interface{}, error)

Base2Exponential returns 2**x, the base-2 exponential of its argument.

func BaseEExponential

func BaseEExponential(e *eval.Evaluator, arguments string) (interface{}, error)

BaseEExponential returns e**x, the base-e exponential of its argument.

func Ceiling

func Ceiling(e *eval.Evaluator, arguments string) (interface{}, error)

Ceiling returns the least integer value greater than or equal to its argument.

func CubeRoot

func CubeRoot(e *eval.Evaluator, arguments string) (interface{}, error)

CubeRoot returns the cube root of it argument.

func DecimalLog

func DecimalLog(e *eval.Evaluator, arguments string) (interface{}, error)

DecimalLog returns the decimal logarithm of its argument.

func Divide

func Divide(left, right interface{}) (interface{}, error)

Divide /

func DivideAllowDivideByZero

func DivideAllowDivideByZero(left, right interface{}) (interface{}, error)

DivideAllowDivideByZero / (returns 0 for division by 0)

func Equal

func Equal(left, right interface{}) (interface{}, error)

Equal ==

func Floor

func Floor(e *eval.Evaluator, arguments string) (interface{}, error)

Floor returns the greatest integer value less than or equal to its argument.

func Functions

func Functions() map[string]eval.Function

Functions returns standard functions that work with f64d4.Int.

func GreaterThan

func GreaterThan(left, right interface{}) (interface{}, error)

GreaterThan >

func GreaterThanOrEqual

func GreaterThanOrEqual(left, right interface{}) (interface{}, error)

GreaterThanOrEqual >=

func If

func If(e *eval.Evaluator, arguments string) (interface{}, error)

If returns the second argument if the first argument resolves to true, or the third argument if it doesn't.

func LessThan

func LessThan(left, right interface{}) (interface{}, error)

LessThan <

func LessThanOrEqual

func LessThanOrEqual(left, right interface{}) (interface{}, error)

LessThanOrEqual <=

func Maximum

func Maximum(e *eval.Evaluator, arguments string) (interface{}, error)

Maximum returns the maximum value of its input arguments.

func Minimum

func Minimum(e *eval.Evaluator, arguments string) (interface{}, error)

Minimum returns the minimum value of its input arguments.

func Modulo

func Modulo(left, right interface{}) (interface{}, error)

Modulo %

func ModuloAllowDivideByZero added in v1.62.0

func ModuloAllowDivideByZero(left, right interface{}) (interface{}, error)

ModuloAllowDivideByZero % (returns 0 for modulo 0)

func Multiply

func Multiply(left, right interface{}) (interface{}, error)

Multiply *

func NaturalLog

func NaturalLog(e *eval.Evaluator, arguments string) (interface{}, error)

NaturalLog returns the natural logarithm of its argument.

func NaturalLogSum1 added in v1.62.0

func NaturalLogSum1(e *eval.Evaluator, arguments string) (interface{}, error)

NaturalLogSum1 returns the natural logarithm of the sum of its argument and 1.

func NewEvaluator

func NewEvaluator(resolver eval.VariableResolver, divideByZeroReturnsZero bool) *eval.Evaluator

NewEvaluator creates a new evaluator whose number type is fixed.F64d4.

func Not

func Not(arg interface{}) (interface{}, error)

Not !

func NotEqual

func NotEqual(left, right interface{}) (interface{}, error)

NotEqual !=

func NumberFrom

func NumberFrom(arg interface{}) (f64d4.Int, error)

NumberFrom attempts to extract a number from arg.

func Operators

func Operators(divideByZeroReturnsZero bool) []*eval.Operator

Operators returns standard operators that work with f64d4.Int.

func Or

func Or(left, right interface{}) (interface{}, error)

Or ||

func Power

func Power(left, right interface{}) (interface{}, error)

Power ^

func Round

func Round(e *eval.Evaluator, arguments string) (interface{}, error)

Round returns the nearest integer, rounding half away from zero.

func SquareRoot

func SquareRoot(e *eval.Evaluator, arguments string) (interface{}, error)

SquareRoot returns the square root of it argument.

func Subtract

func Subtract(left, right interface{}) (interface{}, error)

Subtract - (subtraction)

func SubtractUnary

func SubtractUnary(arg interface{}) (interface{}, error)

SubtractUnary - (minus)

Types

This section is empty.

Jump to

Keyboard shortcuts

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