Method | Description | |
---|---|---|
Affirm ( |
Applies numeric affirmation (i.e. unary plus) to numeric values
|
|
Negate ( |
Applies numeric negation (i.e. unary minus) to numeric values
|
|
Parse ( |
Parses arithmetic expressions Only works with operands that evaluate to either numeric or string types. If both operands are strings and arithType is ADD, concatenation is performed. Else, if either operand is of a float type, both are treated as float type. Else, both are treated as int types. This is to ensure proper behavior of operators such as addition and division. If operands are of int type, result is then parsed as a literal expression to ensure correct return type. |