[solved] Division always return 0.0

What have I missed in the following code?

server.log(format("Mul %f",(5*10))); >>> Mul 50.000000 server.log(format("Div %f",(5/10))); >>> Div 0.000000

The 5/10 is not promoted to float. Do 5.0/10 to get 0.5 . Just formatting the result as float doesn’t change the calculation.

At least one of the operands must be float or else the result is integer. In this case 0

Floats and Integers

Thanks for the help!