Here is the output I have generated. Have a look at line 36:
1 The current total '0' (integer) + new subTotal '-25969.65' type(double) = new total '-25969.65'
2 The current total '-25969.65' (double) + new subTotal '239.6' type(double) = new total '-25730.05'
...
35 The current total '-163.89' (double) + new subTotal '60.95' type(double) = new total '-102.94'
36 The current total '-102.94' (double) + new subTotal '97.71' type(double) = new total '-5.2300000000009'
37 The current total '-5.2300000000009' (double) + new subTotal '50' type(double) = new total '44.769999999999'
The code used to generate the above out put is:
- Code: Select all
echo ($counter++) . " The current total '$transTotal' (".gettype($transTotal).") + new subTotal '$varTotal' type(".gettype($varTotal).") = new total '" . ($transTotal + $varTotal) ."'<br />";
Can any one offer an explanation as to where the "00000000009" is suddenly coming from?
Thanks
Glen


