Produce an output token on each firing with a value that is
equal to the specified math function of the input.
The input and output types are DoubleToken. The functions
are a subset of those in the java.lang.Math class. They are:
<ul>
<li> <b>exp</b>: The exponential function.
This is the default function for this actor
If the argument is NaN, then the result is NaN.
<li> <b>log</b>: The natural logarithm function.
If the argument is NaN, then the result is NaN.
<li> <b>modulo</b>: The modulo after division.
If the second operand is zero, then the result is NaN.
<li> <b>sign</b>: If the argument is greater than 0, return 1.0, if
it is less than 0, return -1.0, otherwise return 0.0.
<li> <b>square</b>: The square function
If the argument is NaN, then the result is NaN.
<li> <b>sqrt</b>: The square root function.
If the argument is NaN, then the result is NaN.
</ul>
<p>
NOTES:
<p>1. Some functions like exp, log, square, and sqrt act on a single
operand only. Other functions like modulo act on two operands.
The actor acquires a second input when the function is changed to
modulo, and loses the input when the function is changed back.
<p>2. There is an alternative to using the MathFunction.modulo() method
If you want to use the IEEE remainder standard, use the Remainder actor.
C. Fong
$Id: MathFunction.java 70402 2014-10-23 00:52:20Z cxh $
Ptolemy II 1.0
Yellow (chf)
Yellow (janneck)
The port for the first operand.
The port has type BaseType.DOUBLE
The port for the second operand, if it is needed.
The port has type BaseType.DOUBLE
Output port.
The port has type BaseType.DOUBLE
The function to compute. This is a string-valued attribute
that defaults to "exp".