math

Overview

Modules

ops

math

Overview

This machine provides functionality for working with basic mathematical functions.

Functions in the math/ops module are supported by infix operators.

Modules

ops

Basic arithmetic operations defined on scalar and matrix input for multiple numeric datatypes.

Operator

Function

Description

+

add

Adds two operands.

-

sub

Subtracts second operand from the first.

*

mul

Multiplies two operands.

/

div

Divides first operand by the second.

^

pow

Raises first operand to the power of the second.

%

mod

Computes the modulus of the first operand by the second.

- (unary)

neg

Negates the operand.