undefinedfix
Sign in

On the value of ceil and floor

pilaraktual edited in Sat, 21 May 2022

How is the ceiling and floor taken? PHP function

ceil('9.0000000000000001')=9
ceil('9.000000000000001')=10

floor('-9.0000000000000001')=-9
floor('-9.000000000000001')=-10

Why is that? How many decimal places does it matter?

1 Replies
Amer
commented on Sat, 21 May 2022

http://www.php.net/manual/zh/...

lock This question has been locked and the reply function has been disabled.