com.singularsys.jep.misc.functions
Class Remainder

java.lang.Object
  extended by com.singularsys.jep.functions.PostfixMathCommand
      extended by com.singularsys.jep.functions.BinaryFunction
          extended by com.singularsys.jep.misc.functions.Remainder
All Implemented Interfaces:
PostfixMathCommandI, RealBinaryFunction, java.io.Serializable

public class Remainder
extends BinaryFunction
implements RealBinaryFunction

Calculates the remainder and quotient the arguments. Three different algorithms can be used

Both arguments are converted to doubles and the the result is a double.

Author:
Richard Morris
See Also:
Modulus, Serialized Form

Nested Class Summary
static class Remainder.Type
           
 
Field Summary
 
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, name, NaN, numberOfParameters
 
Constructor Summary
Remainder(Remainder.Type type)
           
 
Method Summary
 java.lang.Object eval(java.lang.Object l, java.lang.Object r)
           
 double evaluate(double D, double d)
           
 
Methods inherited from class com.singularsys.jep.functions.BinaryFunction
run
 
Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, checkStack, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Remainder

public Remainder(Remainder.Type type)
Parameters:
type -
Method Detail

eval

public java.lang.Object eval(java.lang.Object l,
                             java.lang.Object r)
                      throws EvaluationException
Specified by:
eval in class BinaryFunction
Throws:
EvaluationException

evaluate

public double evaluate(double D,
                       double d)
Specified by:
evaluate in interface RealBinaryFunction


Copyright © 2010 Singular Systems http://www.singularsys.com/jep