Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BODMAS

0 Kudos

Now lets assume that we don't have absolute figures but variables,

So

" Assume that all the values are of type XKWERT

A = 1

B = 3

C = 3

So, Z = A / B * C

Z = 1/9 = 0.111111111

How does this happen?

Now as strange behaviour has been noticed, in one of our clients Z = 1 and in other client z = 0.111111111

Please let me know the solution.

In which scenario will this happen??

Regards,

Dantham Conplowedson

1 REPLY 1

0 Kudos

arith_exp - arithmetic operators

The table shows the possible arithmetic operators arithmetic expressions, their priority, and the order of calculation. Within one set of parentheses (see below), calculations with operators of higher priority are performed before calculations with operators of a lower priority. For consecutive operators with the same priority, the calculation is performed in the order specified in the table. In the third column of the table, 3 indicates the highest priority and 1 the lowest.

Operator Calculation Priority Order

+ Addition of operands 1 from left to right

- Subtraction of the right from the left operand 1 left to right

* Multiplication of operands 2 from left to right

/ Division of the left by the right operand 2 from left to right

DIV Integer portion of the division of the left by the right operand 2 from left to right

MOD Integer remainder of the division of the left by the right operand 2 from left to right

** Exponentiation of the left with the right operand 3 from right to left