Why this function return -2.8421709430404E-14 ?
Posted: Mon Apr 18, 2011 3:20 am
Code: Select all
<?Php
function getDiscount() {
$discount = 100;
return (245/100) * $discount;
}
echo 245-getDiscount();
?>
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?Php
function getDiscount() {
$discount = 100;
return (245/100) * $discount;
}
echo 245-getDiscount();
?>