Published on InterSystems Developer Community (https://community.intersystems.com)

Home > IRIS and the order of operations: 1*2+2*3=12 but (1*2)+(2*3)=8; is there a setting somewhere to adopt the same conventions as everyone else in the world ?

Question
Michel Liberado · Nov 26, 2021

IRIS and the order of operations: 1*2+2*3=12 but (1*2)+(2*3)=8; is there a setting somewhere to adopt the same conventions as everyone else in the world ?

Hi,

I wonder why IRIS seems to have its on way to deal with order or operations such as the example in the title. This affects regular arithmetic operations but of course conditions in various statements.

Even after years of COS development, I still get caught by these tiny frustrating details and it is absolutely annoying when you are writing APIs that some some maths.

 

Here is an example:

 

The last example is from here.

But, if you use any other calc:

 

With Google calc:

#InterSystems IRIS
Product version: IRIS 2021.1

Source URL:https://community.intersystems.com/post/iris-and-order-operations-122312-12238-there-setting-somewhere-adopt-same-conventions-everyone