求助:关于浮点取模的一个问题
在书上看的一个例程
<?php<br />$a=5;<br />$b=3;<br />echo $a/$b%$b;<br />?>
上案例取模的结果为1。
以下为个人理解,但不敢肯定,请大神给予解答。
$a/$b得到一个浮点数做为被除数再与做为除数的%b进行取模,当被除数是浮点型且小于除数时,所取模不足1时,是不是把小数点后面的第一位自动进1,且不按四舍五入的原则?
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn