com.singularsys.jep.functions

## Class Modulus

- java.lang.Object
- - com.singularsys.jep.functions.PostfixMathCommand
  - - com.singularsys.jep.functions.BinaryFunction
    - - com.singularsys.jep.functions.Modulus

- All Implemented Interfaces:
    PostfixMathCommandI, RealBinaryFunction, java.io.Serializable
  Direct Known Subclasses:
    BigDecMod

      public class Modulus
      extends BinaryFunction
      implements RealBinaryFunction

  Calculates the modulus x % y of the arguments. Both arguments are converted to doubles and the the result is a double. The sign of the result is the same as the sign of the argument.
  Author:
    Richard Morris
  See Also:
    `Remainder`, Serialized Form

- - ### Field Summary

    - ### Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand

      `curNumberOfParameters, name, NaN, numberOfParameters`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Modulus()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `eval(java.lang.Object l, java.lang.Object r)`
    `double` | `evaluate(double l, double r)`
    `java.lang.Object` | `mod(java.lang.Object l, java.lang.Object r)`

    - ### 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, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Modulus

          public Modulus()

  - ### 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`

    - #### mod

          public java.lang.Object mod(java.lang.Object l,
                                      java.lang.Object r)
                               throws EvaluationException

      Throws:
        `EvaluationException`

    - #### evaluate

          public double evaluate(double l,
                                 double r)

      Specified by:
        `evaluate` in interface `RealBinaryFunction`

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