[SOLVED ]Maths Glitch?
Posted: Wed Sep 01, 2010 4:37 am
Trying to do a bit of maths in PHP and I have run into an issue when using brackets:
This produces the result 10. Which isn't correct:
http://www.wolframalpha.com/input/?i=10+-+(10+*+(100/1000))
If anyone could provide any suggestions, that would be great. I've tried rearranging the brackets myself, but always get 10. (Other than the obvious option of doing the equation in two separate sections).
Code: Select all
$fltGroundFloorArea = 10;
$beamWidth = 100;
$blockworkArea = $fltGroundFloorArea - ($fltGroundFloorArea * ($beamWidth / 1000));http://www.wolframalpha.com/input/?i=10+-+(10+*+(100/1000))
If anyone could provide any suggestions, that would be great. I've tried rearranging the brackets myself, but always get 10. (Other than the obvious option of doing the equation in two separate sections).