Where is it specified that these are integers (or integer operations)?
In fact, integers aren’t even mentioned in the DQL data types page - only double and long are listed.
I did not mean “integer data type”, but meant “integer mathematical concept” (Integer - Wikipedia)
When you convert “long” numbers to “double” numbers (floating point) it will work too, but will be give you result in form of “double”. What type you want to get in the end of course depends on your requirements.
Re: “order of operations” which often matter when dealing with integers . DQL uses most common approach uses by programming languages (“left to right”), probably that’s why it was never mentioned in documentation. Example in second paragraph here covers similar case like ours: Order of operations - Wikipedia