Forum Documentation Showcase Pricing Learn more

Order of operations


#1

Does Bubble follow the standard mathematical order of operations.
For example, will this divide input 2’s value by 5 and take that away from input ones value, or does it work left to right. If it’s the later, how to I adjust the operation when setting a variable (thing).

Input 1’s value – input 2’s value / 5


Is it possible to use brackets in a calculation?
#2

It works left to right, not order of operations. I’ve realized that while creating my app. A way to work around it is to run a workflow for the part you want calculated first, store that value, and then create another workflow segment for the second part, etc.


#3

That’s correct, we’ll add parenthesis at some point, probably not too far away, but right now that’s the right approach.


#4

Makes sense. Thank you both!!


#5

Any update on this. Order of operation is important just for everyone’s reference the order is BEDMAS


#6

Has this been changed/updated yet?

Or is the original approach still required?

Will this not work according to BEDMAS?


#7

Have you added parentheses yet?


#8

have you added parenthesis yet?


#9

How’s it going with the parenthesis?


#10

What’s the status on this?


#11

Parenthesis would be really nice to have


#12

It’s on our list of features to add. We’ll keep you posted.


#13

please add parenthesis its been 3 years


#14

please add them


#15

Haha. I learned it

Please excuse my dear aunt sally. PEMDAS

Same thing though. :slight_smile: