gnu.kawa.functions
Class DivideOp
java.lang.Object
gnu.mapping.PropertySet
gnu.mapping.Procedure
gnu.mapping.ProcedureN
gnu.kawa.functions.ArithOp
gnu.kawa.functions.DivideOp
- All Implemented Interfaces:
- Named
public class DivideOp
- extends ArithOp
Implement the Scheme standard function "/".
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 |
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.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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
$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
DivideOp
public DivideOp(java.lang.String name,
int op)
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