Class DivideOp

All Implemented Interfaces:
Named

public class DivideOp extends ArithOp
Implement the Scheme standard function "/".
  • Field Details

    • SLASH

      public static final DivideOp SLASH
    • idiv

      public static final DivideOp idiv
    • iceil

      public static final DivideOp iceil
    • floorQuotient

      public static final DivideOp floorQuotient
    • quotient

      public static final DivideOp quotient
    • remainder

      public static final DivideOp remainder
    • modulo

      public static final DivideOp modulo
    • div

      public static final DivideOp div
    • mod

      public static final DivideOp mod
    • div0

      public static final DivideOp div0
    • mod0

      public static final DivideOp mod0
  • Constructor Details

    • DivideOp

      public DivideOp(String name, int op)
  • Method Details

    • getRoundingMode

      public int getRoundingMode()
      Return one of FLOOR, CEILING, TRUNCATE, ROUND, or 0 if not applicable. These are defined in gnu.math.Numeric.
    • applyN

      public Object applyN(Object[] args) throws Throwable
      Overrides:
      applyN in class Procedure
      Throws:
      Throwable
    • apply2

      public Object apply2(Object arg1, Object arg2) throws Throwable
      Overrides:
      apply2 in class Procedure
      Throws:
      Throwable
    • numArgs

      public int numArgs()
      Description copied from class: Procedure
      Return minArgs()|(maxArgs<<12). We use a single virtual function to reduce the number of methods in the system, as well as the number of virtual method table entries. We shift by 12 so the number can normally be represented using a sipush instruction, without requiring a constant pool entry.
      Overrides:
      numArgs in class Procedure