MathFunction
ptolemy.actor.lib.MathFunction

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:

NOTES:

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.

2. There is an alternative to using the MathFunction.modulo() method If you want to use the IEEE remainder standard, use the Remainder actor.

Author(s): C. Fong
Version:$Id: MathFunction.java,v 1.52 2005/10/28 19:20:13 cxh Exp $
Pt.Proposed Rating:Yellow (chf)
Pt.Accepted Rating:Yellow (janneck)


firstOperand
The port for the first operand. The port has type BaseType.DOUBLE

secondOperand
The port for the second operand, if it is needed. The port has type BaseType.DOUBLE

output
Output port. The port has type BaseType.DOUBLE



function
The function to compute. This is a string-valued attribute that defaults to "exp".