Bentrix Docs
HomePricingDashboard

Assay reference: math

runs as written · runs with Bentrix's own convention, said in its note · refused by name, the note says what Bentrix lacks · not yet built.

Functions

math.abs#

runs
math.abs(number: num) → num

The absolute value

numbernumrequired

math.acos#

runs
math.acos(number: num) → float

The arccosine in radians

numbernumrequired

math.asin#

runs
math.asin(number: num) → float

The arcsine in radians

numbernumrequired

math.atan#

runs
math.atan(number: num) → float

The arctangent in radians

numbernumrequired

math.avg#

runs
math.avg(number0: num, number1: num, more: num...) → float

The mean; na if any is na

number0numrequired
number1numrequired
morenum...required

math.ceil#

runs
math.ceil(number: num) → int

The smallest integer not below

numbernumrequired

math.cos#

runs
math.cos(angle: num) → float

The cosine of radians

anglenumrequired

math.exp#

runs
math.exp(number: num) → float

E raised to the number

numbernumrequired

math.floor#

runs
math.floor(number: num) → int

The largest integer not above

numbernumrequired

math.log#

runs
math.log(number: num) → float

The natural logarithm

numbernumrequired

math.log10#

runs
math.log10(number: num) → float

The base-10 logarithm

numbernumrequired

math.max#

runs
math.max(number0: num, number1: num, more: num...) → num

The greatest; na if any is na

number0numrequired
number1numrequired
morenum...required

math.min#

runs
math.min(number0: num, number1: num, more: num...) → num

The least; na if any is na

number0numrequired
number1numrequired
morenum...required

math.pow#

runs
math.pow(base: num, exponent: num) → float

Base raised to exponent

basenumrequired
exponentnumrequired

math.random#

runs — Bentrix's own convention
math.random(min: num?, max: num?, seed: int?) → float

A number in [min, max), seeded from the bench, the bar's time and the call site so a replay draws the same numbers

minnumoptional
maxnumoptional
seedintoptional

math.round#

runs
math.round(number: num, precision: int?) → rint

The nearest integer, halves away from zero; with a precision, a float to that many decimals

numbernumrequired
precisionintoptional

math.round_to_mintick#

runs — Bentrix's own convention
math.round_to_mintick(number: num) → float

The nearest multiple of the FEED's point

numbernumrequired

math.sign#

runs
math.sign(number: num) → num

-1, 0 or 1

numbernumrequired

math.sin#

runs
math.sin(angle: num) → float

The sine of radians

anglenumrequired

math.sqrt#

runs
math.sqrt(number: num) → float

The square root

numbernumrequired

math.sum#

runs
math.sum(source: float, length: int) → float

The sum of the last length values

sourcefloatrequired
lengthintrequired

math.tan#

runs
math.tan(angle: num) → float

The tangent of radians

anglenumrequired

math.todegrees#

runs
math.todegrees(radians: num) → float

Radians to degrees

radiansnumrequired

math.toradians#

runs
math.toradians(degrees: num) → float

Degrees to radians

degreesnumrequired

Constants

math.e#

runs

Euler's number

math.phi#

runs

The golden ratio

math.pi#

runs

Π

math.rphi#

runs

The golden ratio's reciprocal

Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed