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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
Implement's Scheme/
operation.static final int
Implements a division operation.static final int
static final int
static final int
Implements a modulo/remainder operation.static final int
static final int
Implements a quotient operation.static final int
Implements a quotient operation.static final int
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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
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 Details
-
DIVIDE_GENERIC
public static final int DIVIDE_GENERICImplement's Scheme/
operation.- See Also:
-
DIVIDE_INEXACT
public static final int DIVIDE_INEXACTImplements a division operation. Like Scheme's(exact->inexact (/ x y))
.- See Also:
-
QUOTIENT
public static final int QUOTIENTImplements a quotient operation. Depends on the value ofgetRoundingMode()
. Operands are real; result is an integer. Inexact operands yield inexact integer result.- See Also:
-
QUOTIENT_EXACT
public static final int QUOTIENT_EXACTImplements 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:
-
MODULO
public static final int MODULOImplements a modulo/remainder operation. Depends on the value ofgetRoundingMode()
. Operands and result are real.- See Also:
-
ASHIFT_GENERAL
public static final int ASHIFT_GENERAL- See Also:
-
ASHIFT_LEFT
public static final int ASHIFT_LEFT- See Also:
-
ASHIFT_RIGHT
public static final int ASHIFT_RIGHT- See Also:
-
LSHIFT_RIGHT
public static final int LSHIFT_RIGHT- See Also:
-
AND
public static final int AND- See Also:
-
IOR
public static final int IOR- See Also:
-
XOR
public static final int XOR- See Also:
-
NOT
public static final int NOT- See Also:
-
-
Constructor Details
-
ArithOp
-
-
Method Details
-
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
-