package arithmetic
- Alphabetic
- Public
- Protected
Type Members
- sealed abstract class ArithmeticInterpreter extends AnyRef
Created by chris on 1/25/16.
- sealed abstract class ArithmeticOperation extends constant.ScriptOperation
Created by chris on 1/6/16.
Value Members
- object ArithmeticInterpreter extends ArithmeticInterpreter
- object ArithmeticOperation extends ScriptOperationFactory[ArithmeticOperation]
- case object OP_0NOTEQUAL extends ArithmeticOperation with Product with Serializable
Returns 0 if the input is 0.
Returns 0 if the input is 0. 1 otherwise.
- case object OP_1ADD extends ArithmeticOperation with Product with Serializable
1 is added to the input.
- case object OP_1SUB extends ArithmeticOperation with Product with Serializable
1 is subtracted from the input.
- case object OP_2DIV extends ArithmeticOperation with Product with Serializable
The input is divided by 2.
The input is divided by 2. disabled.
- case object OP_2MUL extends ArithmeticOperation with Product with Serializable
The input is multiplied by 2.
The input is multiplied by 2. disabled.
- case object OP_ABS extends ArithmeticOperation with Product with Serializable
The input is made positive.
- case object OP_ADD extends ArithmeticOperation with Product with Serializable
a is added to b.
- case object OP_BOOLAND extends ArithmeticOperation with Product with Serializable
If both a and b are not 0, the output is 1.
If both a and b are not 0, the output is 1. Otherwise 0.
- case object OP_BOOLOR extends ArithmeticOperation with Product with Serializable
If a or b is not 0, the output is 1.
If a or b is not 0, the output is 1. Otherwise 0.
- case object OP_DIV extends ArithmeticOperation with Product with Serializable
a is divided by b.
a is divided by b. disabled.
- case object OP_GREATERTHAN extends ArithmeticOperation with Product with Serializable
Returns 1 if a is greater than b, 0 otherwise.
- case object OP_GREATERTHANOREQUAL extends ArithmeticOperation with Product with Serializable
Returns 1 if a is greater than or equal to b, 0 otherwise.
- case object OP_LESSTHAN extends ArithmeticOperation with Product with Serializable
Returns 1 if a is less than b, 0 otherwise.
- case object OP_LESSTHANOREQUAL extends ArithmeticOperation with Product with Serializable
Returns 1 if a is less than or equal to b, 0 otherwise.
- case object OP_LSHIFT extends ArithmeticOperation with Product with Serializable
Shifts a left b bits, preserving sign.
Shifts a left b bits, preserving sign. disabled.
- case object OP_MAX extends ArithmeticOperation with Product with Serializable
Returns the larger of a and b.
- case object OP_MIN extends ArithmeticOperation with Product with Serializable
Returns the smaller of a and b.
- case object OP_MOD extends ArithmeticOperation with Product with Serializable
Returns the remainder after dividing a by b.
Returns the remainder after dividing a by b. disabled.
- case object OP_MUL extends ArithmeticOperation with Product with Serializable
a is multiplied by b.
a is multiplied by b. disabled.
- case object OP_NEGATE extends ArithmeticOperation with Product with Serializable
The sign of the input is flipped.
- case object OP_NOT extends ArithmeticOperation with Product with Serializable
If the input is 0 or 1, it is flipped.
If the input is 0 or 1, it is flipped. Otherwise the output will be 0.
- case object OP_NUMEQUAL extends ArithmeticOperation with Product with Serializable
Returns 1 if the numbers are equal, 0 otherwise.
- case object OP_NUMEQUALVERIFY extends ArithmeticOperation with Product with Serializable
Same as OP_NUMEQUAL, but runs OP_VERIFY afterward.
- case object OP_NUMNOTEQUAL extends ArithmeticOperation with Product with Serializable
Returns 1 if the numbers are not equal, 0 otherwise.
- case object OP_RSHIFT extends ArithmeticOperation with Product with Serializable
Shifts a right b bits, preserving sign.
Shifts a right b bits, preserving sign. disabled.
- case object OP_SUB extends ArithmeticOperation with Product with Serializable
b is subtracted from a.
- case object OP_WITHIN extends ArithmeticOperation with Product with Serializable
Returns 1 if x is within the specified range (left-inclusive), 0 otherwise.