Apama 10.3 | Apama Documentation | Developing Apama Applications | EPL Reference | Expressions | Multiplicative operators
 
Multiplicative operators
The multiplicative operators are used to perform arithmetic on two operands of matching type: both decimal, or both float, or both integer.
The left and right operands must both be expressions of type decimal, or both be of type float, or both be of type integer.
The result type of the multiplicative operators is the same as the type of the operands.
The multiplicative operators are:
Operator
Operation
Description
*
Multiplication
Produces a result by computing the numeric product of its two operands. If the two operands are both expressions of type integer, then integral multiplication is performed and the result is of type integer. If the two operands are both of type decimal or both of type float, then floating-point multiplication is performed and the result type is the same as the operand type.
/
Division
Produces a result by computing the numeric quotient of its two operands. The left operand value, the dividend, is divided by the right operand value, the divisor. If both operands are of type integer, any fractional part of the result value is discarded. In other words, the result is truncated toward zero. For example, the expression 13/5 yields a result of 2. If both operands are of type integer, then integral division is performed and the result is of type integer. If both operands are of type decimal or both are of type float, then floating-point division is performed and the result type is the same as the operand type.
If the right operand's value is zero, a runtime error is raised.
%
Remainder
Produces a result by computing the numeric remainder from dividing the left operand value by the right operand value. For example, the expression 13%5 yields a result of 3. If both operands are of type integer, then the integral remainder is computed and the result is of type integer. If both operands are of type decimal or both of type float, then the floating-point remainder is computed and the result type is the same as the operand type.
If the right operand's value is zero, a runtime error is raised.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.