If I do this equation in Firebase functions (in JavaScript):
var q = 0.1
var alpha = 0.1
var gamma = 0.99
var max5 = 0
q = (1 - alpha) * q + (alpha * (-1 + (gamma * max5)));
console.log(q)
the result is -0.009999999999999995
But if I do this equation on a calculator it is -0.01
I should note, I pasted a simplified version of the code above, but all the variables get the parseFloat operation, so I'm sure it has something to do with that. Or is it something else?