Simple math operations missing?

I would like to set an element state (an integer) to the negative value of another element state. Or simply set the element state to -1 for example. Every time I try, starting an expression with -1 gives 0 and no more options for adding additional terms to the expression. What gives?

Another frustrating property is the lack of simple brackets in bubble’s math logic. How would I go about an expression like this, for example:

c = ceil( a / b) ? Or how about c = a * exp(-b) ?

It seems Bubble has no concept of functions unless they are applied to an existing property. I can’t believe that essential algebra and basic functions don’t exist in bubble? Surely I am overlooking something.

Hey there! Take a look at the Math.js plugin. It should help you a ton! I’m also releasing a tutorial on this topic exactly in my VIP Membership if you’re interested in checking it out. Either way, that plugin should get you moving forward!

Hi there. Thanks for that. However I can’t seem to figure out how to use this plugin. What goes in the expression field? Do I write math.evaluate(‘some expression with dynamic references’)? Or simply ‘some expression with dynamic references’? Is there any way to debug what the plugin does?