Microsoft MakeCode

Math.pow floating point issues

Hi everyone!

I’ll keep this short and sweet. It seems that if you raise a static value to a floating point exponential, it works fine. But if you use variable, and raise it to an exponential, it converts the exponent to an integer:

The code “on button A pressed”, will just compute y^1 as the 1.3 is rounded down to 1.
The code “on button B pressed”, will compute 40^1.3 as I would like.

I have tried multiplying y by 1.0. I’ve tried converting 1.3 to a string then using parseFloat to bring it back, just about everything I can think of to force it to not round. It seems a strange bug. Any ideas?

Thanks,
Josh