IOBox calculations don't work for negative numbers

I love how you can do very simple calculations for values in IOBoxes. But it doesn’t work when a value is negative.

iobox_calc

This was actually reported ages ago here, but ignored: IOBox quick maths wont work when one of the values is negative - bug - Forum

Still happening in gamma 6.6 and 6.7-0095

unfortunately, according to the underlying math parser used, you have to write ±2 instead of -2 for sign-changes…

i’ve added this info to the graybook.

Okay, but this in in a float box and the Math Interpreter works on strings. Doesn’t that mean that you should internally convert the - in -1.23 to ±1.23 instead?

As you mention, if I put “±1.23-1” into a float IOBox it then shows “-2.23”.

Would that be feasible? Otherwise if we have to hunt down the ± symbol, change the - to ± and then add the calculation then its a bit pointless.

Internally you could just check if the number is below 0 and if it is change the first - to ± internally. I mean it’s probably not that simple, but there must be a way to make it work.

1 Like

Or maybe use a different parser. Doing a quick search I came across:

It needs a license for commercial software but the price seems quite reasonable.

3 Likes