Hi,
I'm very new to PHP...and I'm getting unexpected values for variable calculations:
$var1 = $var2 * (((1 + $var3)^$var4)^$var5);
I've verified that $var2 is 3, $var3 is 0.1, $var4 is 1, $var5 is 1.1 so,
$var1 = 3*(((1+0.1)^1)^1.1) = 3.3316 but in PHP, $var1 = 3
if I change $var4 to 2,
$var1 = 3*(((1+0.1)^1)^1.1) = 3.6999 but in PHP, $var1 = 6
Why is this? Any ideas? I've tried explicitly declaring all variables as floats.