gnu.kawa.functions
Class DivideOp

java.lang.Object
  extended by gnu.mapping.PropertySet
      extended by gnu.mapping.Procedure
          extended by gnu.mapping.ProcedureN
              extended by gnu.kawa.functions.ArithOp
                  extended by gnu.kawa.functions.DivideOp
All Implemented Interfaces:
Named

public class DivideOp
extends ArithOp

Implement the Scheme standard function "/".


Field Summary
static DivideOp $Sl
           
static DivideOp div
           
static DivideOp div0
           
static DivideOp idiv
           
static DivideOp mod
           
static DivideOp mod0
           
static DivideOp modulo
           
static DivideOp quotient
           
static DivideOp remainder
           
 
Fields inherited from class gnu.kawa.functions.ArithOp
AND, ASHIFT_GENERAL, ASHIFT_LEFT, ASHIFT_RIGHT, DIVIDE_GENERIC, DIVIDE_INEXACT, IOR, LSHIFT_RIGHT, MODULO, NOT, QUOTIENT, QUOTIENT_EXACT, XOR
 
Fields inherited from class gnu.mapping.ProcedureN
noArgs
 
Fields inherited from class gnu.mapping.Procedure
compilerKey, validateApplyKey
 
Fields inherited from class gnu.mapping.PropertySet
nameKey
 
Constructor Summary
DivideOp(java.lang.String name, int op)
           
 
Method Summary
 java.lang.Object applyN(java.lang.Object[] args)
           
 int getRoundingMode()
          Return one of FLOOR, CEILING, TRUNCATE, ROUND, or 0 if not applicable.
 int numArgs()
          Return minArgs()|(maxArgs<<12).
 
Methods inherited from class gnu.kawa.functions.ArithOp
classify, defaultResult, isSideEffectFree
 
Methods inherited from class gnu.mapping.ProcedureN
apply0, apply1, apply2, apply3, apply4
 
Methods inherited from class gnu.mapping.Procedure
apply, apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getReturnType, getSetter, getSourceLocation, match0, match1, match2, match3, match4, matchN, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toString
 
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

$Sl

public static final DivideOp $Sl

idiv

public static final DivideOp idiv

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 Detail

DivideOp

public DivideOp(java.lang.String name,
                int op)
Method Detail

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 java.lang.Object applyN(java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
applyN in class ProcedureN
Throws:
java.lang.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