Bug #15403 Updated: Strange behavior of floor() with negative values

From: Date: Wed, 06 Feb 2002 13:59:39 +0000
Subject: Bug #15403 Updated: Strange behavior of floor() with negative values
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-79356@lists.php.net to get a copy of this message
ID: 15403 Updated by: hholzgra@php.net Reported By: mail@sebastian-bopp.de -Status: Open +Status: Bogus Bug Type: *Math Functions Operating System: Windows NT PHP Version: 4.1.1 New Comment: from http://php.net/floor: "Returns the next lowest integer ..." -2 < -1.6 < -1 so -2 is the next lowest integeter, not -1 Previous Comments: ------------------------------------------------------------------------ [2002-02-06 08:31:06] mail@sebastian-bopp.de echo floor(1.6); // will output "1" This is allright... echo floor(-1.6); // will output "-2" But shouldn't this one output "-1" instead? --- Sebastian ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15403&edit=1

« previous php.dev (#79356) next »