mathLib Overview

 

Overview

The math Lambda is a global Lambda containing a number of mathematical constants and functions useful in machine learning and numeric programming. This Lambda supports a library of basic vector and matrix mathematical functions, including vector product, vector dot product, multiple linear regression, matrix inversion, support vector machines, evolutionary regression, symbolic math, and many more.

Some of the mathematical constants and functions contained in the math Lambda runtime environment are as follows:

math Lambda Mathematical constants and functions used in machine learning
math.E Constant Base of natural logarithms (2.718...)
math.LN2 Constant Natural logarithm of 2 (0.693...)
math.LN10 Constant Natural logarithm of 10 (2.302...)
math.LOG2E Constant Base 2 logarithm of e (1.442...)
math.LOG10E Constant Base 10 logarithm of e (0.434...)
math.PI Constant Ratio of circumference to diameter (3.141...)
math.SQRT1_2 Constant Square root of one half (0.707...)
math.SQRT2 Constant Square root of two (1.414...)
math.exp(x) Function Returns E raised to the power of a single argument.
math.floor(x) Function Rounds down to next integer for one argument.
math.log(x) Function Returns the natural logarithm for one argument.
math.max(x,y) Function Returns the maximum of two arguments.
math.min(x,y) Function Returns the minimum of two arguments.
math.pow(x,p) Function Returns x raised to the power of p.
math.random(x) Function Returns a random number between zero and one.
math.round(x) Function Rounds to the closest integer.
math.sin(x) Function Returns sine of a single argument.
math.sqrt(x) Function Returns square root of a single argument.
math.tan(x) Function Returns tangent of a single argument.
between(target,low,high) Global Function Returns true if target is between low and high.
BIGNEGNUM Global Constant Largest possible negative number.
BIGPOSNUM Global Constant Largest possible positive number.
numCheck(x) Global Macro Returns true if x is a valid number.