|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-06-27 20:40 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 00:00:01 2025 UTC |
Description: ------------ When I multiply 2.30 by 100 and then try to typecast the result as a integer, I get the result 229. Reproduce code: --------------- <?php echo "2.30"*100; echo "\n"; echo (int)("2.30"*100); echo "\n"; echo "2.99"*100; echo "\n"; echo (int)("2.99"*100); echo "\n"; echo "2.50"*100; echo "\n"; echo (int)("2.50"*100); echo "\n"; echo "2.55"*100; echo "\n"; echo (int)("2.55"*100); echo "\n"; echo (int)("230"); ?> Expected result: ---------------- 230 230 299 299 250 250 255 255 230 Actual result: -------------- 230 229 299 299 250 250 255 254 230