Ravel’s mathematical operators
Ravel’s mathematical operators
Ravel has a large number of mathematical operators which are accessed via the widget bar. The top-level menu items are shown in Figure 40.

The menus are respectively:
- Binary operators that take 2 (or more) inputs;
- Fundamental constants: e, π , 0, 1, ∝ , and the percentage operator %;
- Unary operators with only one input;
- Running sum and product and difference operators;
- Statistical functions (mean, median, standard deviation, etc.); and
- Mathematical operators for handling multi-dimensional data: dot, inner and outer products, etc.
Figure 40: The mathematical operators menu bar
Click on one of these menu widgets, and the relevant selection of operators will be displayed above the bar. Click on one of these operators, and it will be attached to the mouse cursor for you to place on the canvas. The full complement of operators, aligned with the menu which invokes them, is shown in Figure 41.

Figure 41: Ravel's full complement of mathematical functions
Full details on each of these operators are given via in-context help: hover over an operator, bring up the right-click/context menu, and choose Help.
Operators can be entered onto the canvas by either clicking on the relevant menu and then operator, or by typing its text shortcut on the canvas.
Table 1: The binary menu
Operator | Operation | Shortcut |
|---|---|---|
Add two or more variables together | + | |
Subtract two or more variables. Inputs to the upper (+) and lower (-) inputs are frst added together, then the sum of the input to (-) are subtracted from the sum of the inputs to(+) |
| |
Multiply two or more variables together. | * | |
Divide one or more variables by others. Inputs to the upper (x) and lower (÷) inputs are frst multiplied together, then the product of the input to(x)are divided bytheproduct of the inputs to(÷) | / | |
Return the minimum of two inputs | min | |
Return the maximum of two inputs | max | |
Return 1 if two inputs are both true (equal to or greater than 1), else return 0 | and | |
Return 1 if one input is true (equal to or greater than 1), else return 0 | or | |
Return the log of the inputs to base a. | log | |
Return x to the power of y | pow | |
Polygamma function. For mathematicians. This is a component of the_Minsky_simulation engine. | polyGamma | |
Return 1 if x<y else return 0 | le |

Return 1 if x≤y else return 0 | leq |
|---|---|
Return 1 if x=y else return 0 | eq |
Return the user-defned function with inputs x and y |
Table 2: The fundamental constants menu
Operator | Operation | Shortcut |
|---|---|---|
Parameter equal to Euler’s e≅2.718281828459… | euler | |
Parameter equal toπ ≅3.1415926535897932… | pi | |
Parameter equal to 0 | zero | |
Parameter equal to 1 | one | |
Parameter for Infnity—generates 1.79769 multiplied by 10[308] | inf | |
Takes an input variable and multiplies each element in it by 100 | % |
Table 3: The unary menu
Operator | Operation | Shortcut |
|---|---|---|
Return the square root of the inputted variable | sqrt | |
Return Euler’s e raised to the power of the inputted variable x | exp | |
Return the natural logarithm of the inputted variable | ln | |
Return the sine of the inputted variable | sin | |
Return the cosine of the inputted variable | cos | |
Return the tan of the inputted variable | tan | |
Return the inverse sine of the inputted variable | asin | |
Return the inverse cosine of the inputted variable | acos | |
Return the inverse tan of the inputted variable | atan | |
Return the hyperbolic sine of the inputted variable | ainh | |
Return the hyperbolic cosine of the inputted variable | cosh | |
Return the hyperbolic tan of the inputted variable | tanh | |
Return the magnitude of the inputted variable | abs |


Return the integers of the inputted variable | foor |
|---|---|
Return the inputted variable minus the integer parts | |
The Not operator. Return 0 if the input is <0.5 otherwise return 1 | not_ |
Return the Gamma function of the input (for mathematicians) | |
Return the factorial of the input | fact |
Table 4: The reduction menu
Operator | Operation | Shortcut |
|---|---|---|
Sum the inputs | sum | |
Multiply the inputs | product | |
Infmum: return the smallest value along an axis | infmum | |
Supremum: return the biggest value along an axis | supremum | |
Return 1 if any value along an axis is non-zero, otherwise return 0 | any | |
Return 1 if all values along a given axis are nonzero, otherwise return 0 if anyare zero. | all | |
Infndex. Return the index (the position in an array) of the smallest value alongan axis | ||
Supindex. Return the index (the position in an array) of the greatest value alongagiven axis. |
Table 5: The scan menu
Operator | Operation | Shortcut |
|---|---|---|
Running sum. Return the running sum of the input along a given axis | ||
The running product of the input tensor along a given axis | ||
Prior diference. Calculate the change in values along an axis looking backnsteps (the number of stepsnprior is entered in the edit form). The frstnentries on the axis are truncated. | diference | |
Post diference. Calculate the change in values along an axis looking forwardnsteps (the number of stepsnprior is entered in the edit form). The lastnentries on the axis are truncated. | diferencePlus |
Table 6: The statistics menu
Operator | Operation | Shortcut |
|---|---|---|
Return the mean (average) of the input | mean |
Returns the median along a named dimension | median | |
|---|---|---|
Returns the standard deviation along a named dimension | ||
Returns the $k$-th moment about the mean along a named dimension. | moment | |
Computes the histogram along a named dimension. The number of bins is set on the Edit menu | historgram | |
Computes the covariance of two tensors along a named dimension. This returns a single number when two one-dimensional variables are compared, otherwise it returns a matrix of the covariance patterns across the additional dimensions | covariance | |
Returns the correlation coeficient of the inputs. This returns a single number when two one-dimensional variables are compared, otherwise it returns a matrix of the correlations patterns across the additional dimensions. | correlation | |
Table 7: The te | Linear regression. This takes two arguments—the dependent (top input) and independent variable (bottom input)—and returns a linear regressionprediction for the dependent variable. nsor menu | |
Operator | Operation | Shortcut |
Inner Product. Generates a single number by multiplying all the elements of one vector(or tensor)byanother. | ||
Outer Product. Generates a matrix by the product of one vector with another | ||
Index. Returns the values in an array which are true for a logical condition. | index | |
Gather. Returns values from the top input (x, the variable from which values will begathered), given the values in the bottom(i,the index) | gather | |
Meld. Takes two or more variables with a shared dimension and combines their data on that dimension. | meld | |
Merge. Takes two or more variables with shared dimensions and combines them on a new dimension specifed in the Edit feld. | merge | |
Slice. Extracts a specifed number of data points from an input variable (the topten,etc.) | slice | |
Size. Returns the number of elements along a named dimension | size | |
Shape. Returns a vector of axis sizes | shape |