Package gnu.kawa.functions
Class ArithOp
- java.lang.Object
-
- gnu.mapping.PropertySet
-
- gnu.mapping.Procedure
-
- gnu.mapping.ProcedureN
-
- gnu.kawa.functions.ArithOp
-
- All Implemented Interfaces:
Named
- Direct Known Subclasses:
AddOp
,BitwiseOp
,DivideOp
,MultiplyOp
public abstract class ArithOp extends ProcedureN
-
-
Field Summary
Fields Modifier and Type Field Description static int
AND
static int
ASHIFT_GENERAL
static int
ASHIFT_LEFT
static int
ASHIFT_RIGHT
static int
DIVIDE_GENERIC
Implement's Scheme/
operation.static int
DIVIDE_INEXACT
Implements a division operation.static int
IOR
static int
LSHIFT_RIGHT
static int
MODULO
Implements a modulo/remainder operation.static int
NOT
static int
QUOTIENT
Implements a quotient operation.static int
QUOTIENT_EXACT
Implements a quotient operation.static int
XOR
-
Fields inherited from class gnu.mapping.ProcedureN
applyToObject, noArgs
-
Fields inherited from class gnu.mapping.Procedure
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKey
-
Fields inherited from class gnu.mapping.PropertySet
nameKey
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
defaultResult()
boolean
isSideEffectFree()
True if this Procedure (definitely) has no side-effects.-
Methods inherited from class gnu.mapping.ProcedureN
applyToObject
-
Methods inherited from class gnu.mapping.Procedure
apply0, apply1, apply2, apply3, apply4, applyL, applyN, applyToConsumerDefault, applyToObjectDefault, checkArgCount, checkBadCode, getApplyMethod, getApplyToConsumerMethod, getApplyToObjectMethod, getReturnType, getSetter, getSourceLocation, lookupApplyHandle, maxArgs, maxArgs, minArgs, minArgs, numArgs, set0, set1, setN, setSetter, setSourceLocation, toString
-
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
-
-
-
-
Field Detail
-
DIVIDE_GENERIC
public static final int DIVIDE_GENERIC
Implement's Scheme/
operation.- See Also:
- Constant Field Values
-
DIVIDE_INEXACT
public static final int DIVIDE_INEXACT
Implements a division operation. Like Scheme's(exact->inexact (/ x y))
.- See Also:
- Constant Field Values
-
QUOTIENT
public static final int QUOTIENT
Implements a quotient operation. Depends on the value ofgetRoundingMode()
. Operands are real; result is an integer. Inexact operands yield inexact integer result.- See Also:
- Constant Field Values
-
QUOTIENT_EXACT
public static final int QUOTIENT_EXACT
Implements a quotient operation. Depends on the value ofgetRoundingMode()
. Operands and result are real. Operands are real; result is an integer. Inexact operands yield exact integer result.- See Also:
- Constant Field Values
-
MODULO
public static final int MODULO
Implements a modulo/remainder operation. Depends on the value ofgetRoundingMode()
. Operands and result are real.- See Also:
- Constant Field Values
-
ASHIFT_GENERAL
public static final int ASHIFT_GENERAL
- See Also:
- Constant Field Values
-
ASHIFT_LEFT
public static final int ASHIFT_LEFT
- See Also:
- Constant Field Values
-
ASHIFT_RIGHT
public static final int ASHIFT_RIGHT
- See Also:
- Constant Field Values
-
LSHIFT_RIGHT
public static final int LSHIFT_RIGHT
- See Also:
- Constant Field Values
-
AND
public static final int AND
- See Also:
- Constant Field Values
-
IOR
public static final int IOR
- See Also:
- Constant Field Values
-
XOR
public static final int XOR
- See Also:
- Constant Field Values
-
NOT
public static final int NOT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ArithOp
public ArithOp(String name, int op)
-
-
Method Detail
-
defaultResult
public Object defaultResult()
-
isSideEffectFree
public boolean isSideEffectFree()
Description copied from class:Procedure
True if this Procedure (definitely) has no side-effects. Note side-effect-free does not imply idempotent if this allocates an object with "identity".- Overrides:
isSideEffectFree
in classProcedure
-
-