Class 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
    • TRUNCATED: q = (int) (x/y), r = x - q y . Remainder has same sign as divisor.
    • FLOOR: q = floor(x/y), r = x - q y. Remainder has same sign as dividend.
    • EUCLIDEAN: y>0, q = floor(x/y), y<0, ceil(x/y), r = x - q y. Remainder is non negative.
    Both arguments are converted to doubles and the the result is a double.
    Author:
    Richard Morris
    See Also:
    Modulus, Serialized Form