Last active
August 29, 2015 14:16
-
-
Save iamsujun/81228b9bc6707cd98620 to your computer and use it in GitHub Desktop.
Revisions
-
iamsujun revised this gist
Mar 12, 2015 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ <?php echo (0.58*100) . "<br>"; //58 echo (int)(0.58*100) . "<br>"; //57 echo (1234.11 * 100) . "<br>"; //123411 echo (int)(1234.11 * 100) . "<br>"; //123410 echo intval(1234.12 * 100) . "<br>"; //123411 echo floor(( 0.1 + 0.7 ) * 10) . "\n"; //返回 7 而不是8, echo (int)(( 0.1 + 0.7 ) * 10) . "\n"; //返回7而不是8. echo (int)round( 0.1 + 0.7 ) * 10); //8 -
iamsujun revised this gist
Mar 12, 2015 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,4 +3,9 @@ echo (int)(0.58*100) . "<br>"; echo (1234.11 * 100) . "<br>"; echo (int)(1234.11 * 100) . "<br>"; echo intval(1234.12 * 100) . "<br>"; echo floor(( 0.1 + 0.7 ) * 10) . "\n"; //返回 7 而不是8, echo (int)(( 0.1 + 0.7 ) * 10) . "\n"; //返回7而不是8. echo (int)round( 0.1 + 0.7 ) * 10); -
iamsujun renamed this gist
Mar 12, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
iamsujun created this gist
Mar 12, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ <?php echo (0.58*100) . "<br>"; echo (int)(0.58*100) . "<br>"; echo (1234.11 * 100) . "<br>"; echo (int)(1234.11 * 100) . "<br>"; echo intval(1234.12 * 100) . "<br>";