fn: /
[contents]

Contents

Syntax

The syntax for / calls is:

f++:  
/(params)

n++:  
@/(params)

Description

/ is the arithmetic operator for division, it takes $n \neq 0$ input parameters $p_1, \ldots, p_n$ that should all be numbers and returns $p_1 / \ldots / p_n$ performed from left to right. For example, $/(p_1, p_2, p_3) = p_1 / p_2 / p_3 = (p_1 / p_2) / p_3 = \frac{\frac{p_1}{p_2}}{p_3}$.

Note: It is typically faster to use exprtk for arithmetic operators, plus the syntax is nicer.

f++ example

Example of / being used with f++:

:=(int, a=60, b=10, c=3)
console(/(a, b))
console(/(a, b, c))

n++ example

Example of / being used with n++:

@:=(int, a=60, b=10, c=3)
@console(@/(a, b))
@console(@/(a, b, c))

Sponsors