Forum Sign UP Login Contact Us
HOME : Forum : PHP programming : Post New Topic
problem in integer calculation
mmriceiu
05:11:12 00:40
Hi all experts, I have fetched a peculiar problem in calculating integer value.

<?php
echo (int)((0.1+0.5)*10); // output 6
echo (int)((0.1+0.6)*10); // output 7
// but
echo (int)((0.1+0.7)*10); // output 7 which is a big question of mine

?>


Can anyone help me please?
Please Login to post your reply or start a new topic
Privacy Policy | Disclaimer
©2000 - 2014 plus2net.com All rights reserved worldwide