Bug #68251 [Opn->Nab]: round() var in -1 to 0 return "-0" - it's nosense

From: Date: Fri, 17 Oct 2014 14:45:54 +0000
Subject: Bug #68251 [Opn->Nab]: round() var in -1 to 0 return "-0" - it's nosense
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188169@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68251&edit=1 ID: 68251 Updated by: nikic@php.net Reported by: kamfalg at gmail dot com Summary: round() var in -1 to 0 return "-0" - it's nosense -Status: Open +Status: Not a bug Type: Bug Package: *Math Functions Operating System: debian PHP Version: 5.4.34 Block user comment: N Private report: N New Comment: The -0 result is in accordance with IEEE 754. Please see http://en.wikipedia.org/wiki/Signed_zero for some basic info on negative zero. Previous Comments: ------------------------------------------------------------------------ [2014-10-17 13:14:33] kamfalg at gmail dot com edit ------------------------------------------------------------------------ [2014-10-17 13:11:53] kamfalg at gmail dot com Description: ------------ It should return 0. "-0" is nosense Test script: --------------- echo round(-0.123); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68251&edit=1

« previous php.bugs (#188169) next »