Bugs in Conditional Math

It appears that math inside a conditional is buggy. I tested all of the below by assigning the result to a text box.

This returns 17 as expected:
$floor(1.5)*12==24?12:17$

These all return empty strings:
$floor(40/29)*12==24?12:17$
$(floor(40/29)*12)==24?12:17$
$(floor(40/29)*12==24)?12:17$

From a conditional standpoint, they should all be the same. If I remove it from the conditional and just output the result, it works.

I think this is the same problem that we are experiencing. The engine is not parsing conditionals correctly.

Hi @CompuChip - We’ve identified this as a bug and will be pushing a fix for it on the web early next week. In the meantime, if you use the expression below, it should work as expected on the phone & watch:

$(floor(40/29)*12)==24?12:17$

Let us know if you run into any other issues!

1 Like

Hi @marcus ,

Thanks for the info; I’ll just wait for the fix next week. The actual formula I’m trying to use is much more complicated than my example. :smile:

Thanks,
Chip

@CompuChip, we just pushed that update today, so you should be good to go!

1 Like

Awesome @marcus ! I tested and it appears to function correctly even on my overly complicated formula! Hopefully, I’ll have time this week to wrap up the watchface I’m working on that needed that functionality!

1 Like

@CompuChip That’s great to hear! Looking forward to seeing the final design!

Thanks @marcus - here is my effort. I’ve created a phases of the moon watch. It still isn’t as pretty as I’d like, but it is accurrate :smile:

1 Like

@CompuChip Wow, that’s awesome!