Class Remainder

All Implemented Interfaces:
PostfixMathCommandI, RealBinaryFunction, 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 double and the result is a double.
Author:
Richard Morris
See Also: