Operations

add +
Add multiple numbers together. The input ports allow multiple wires, which are all summed. If an input port is unwired, it is equivalent to setting it to zero.

subtract $-$
Subtract two numbers. The input ports allow multiple wires, which are summed prior to the subtraction being carried out. If an input port is unwired, it is equivalent to setting it to zero. Note the small `+' and `$-$' signs on the input ports indicating which terms are added or subtracted from the result.

multiply $\times$
Multiply numbers with each other. The input ports allow multiple wires, which are all multiplied together. If an input port is unwired, it is equivalent to setting it to one.

divide $\div$
Divide a number by another. The input ports allow multiple wires, which are multiplied together prior to the division being carried out. If an input port is unwired, it is equivalent to setting it to one. Note the small `$\times$' and `$\div$' signs indicating which port refers to the numerator and which the denominator.

log
Take the logarithm of the $x$ input port, to base $b$. The base $b$ needs to be specified -- if the natural logarithm is desired ($b=e$), use the ln operator instead.

pow $x^y$
Raise one number to the power of another. The ports are labelled $x$ and $y$, referring the the formula $x^y$.

lt $<$
Returns 0 or 1, depending on whether $x<y$ is true or false.

le $\le$
Returns 0 or 1, depending on whether $x\le y$ is true or false.

eq $=$
Returns 0 or 1, depending on whether $x=y$ is true or false.

min
Returns the minimum of $x$ and $y$.

max
Returns the maximum of $x$ and $y$.

and $\wedge$
Logical and of $x$ and $y$, where $x\le 0.5$ means false, and $x>0.5$ means true. The output is 1 or 0, depending on the result being true or false respectively.

or $\vee$
Logical or of $x$ and $y$, where $x\le 0.5$ means false, and $x>0.5$ means true. The output is 1 or 0, depending on the result being true or false respectively.

not $\neg$
The output is 1 or 0, depending on whether $x\le 0.5$ is true or false respectively.

time \resizebox{!}{2ex}{\includegraphics{images/time.eps}}
Returns the current value of system time.

copy
This just copies its input to its output, which is redundant on wiring diagrams, but is needed for internal purposes.

integrate \resizebox{!}{2ex}{\includegraphics{images/int.eps}}
Creates an integration (or stock) variable. Editable attributes include the variable's name and its initial value at $t=0$.

differentiate \resizebox{!}{2ex}{\includegraphics{images/differentiate.eps}}
Symbolically differentiates its input.

data \resizebox{!}{2ex}{\includegraphics{images/data.eps}}
A data interpolation widget. Currently, the data must be imported from a file containing two values on each line, eg:
0.1 0.3
0.5 0.7
0.9 1
If the input is less than the minimum key value (0.1 here), then the operation outputs the corresponding value (0.3). Similarly if the input is greater than the maximum (0.9), the corresponding value (1) is output. If it lies in between two keys (eg 0.2), the the output is linearly interpolated (0.4).

More formally, a data block is an empirical function, based on a table of pairs of values ( $x_i, y_i, i=1\ldots n, x_{i+1}>x_i$) read in from a file. The function's output is linearly interpolated from the data, ie:

\begin{displaymath}
f(x) = \left\{
\begin{array}{cl}
y_1 & x < x_1\\
y_n & x\ge...
..._i)}{x_{i+1}-x_i} & x_i \leq x <
x_{i+1}\\
\end{array}\right.
\end{displaymath}

sqrt $\surd$
Square root of the input

exp
Exponential of the input

ln
Natural logarithm

sin
sine function
cos
cosine function
tan
tangent function
asin
Arc sine, inverse of sine
acos
Arc cosine, inverse of cosine
atan
Arc tangent, inverse of tangent
sinh
hyperbolic sine function $\frac{e^x-e^{-x}}2$
cosh
hyperbolic cosine function $\frac{e^x+e^{-x}}2$
tanh
hyperbolic tangent function $\frac{e^x-e^{-x}}{e^x+e^{-x}}$
abs $\vert x\vert$
absolute value function
floor $\lfloor x\rfloor$
The greatest integer less than or equal to $x$.
frac
Fractional part of $x$, ie $x-\lfloor x\rfloor$.

Russell Standish 2017-01-05