Code: Select all
<?php
{
$x = (0.25*(4000 / 65) - 0.0005*(4000 / 65)^2) / 100;
printf($x);
}
?>When I change both occurrences of "4000" to "4200" I get 0.18 when the expected result is 0.140663
Can someone help me out with what is not working here. I have used this same formula in Excel spreadsheet and Visual basic and it works as expected.