Edit report at https://bugs.php.net/bug.php?id=60393&edit=1

 ID:                 60393
 Updated by:         cataphr...@php.net
 Reported by:        athlan at vgroup dot pl
 Summary:            Generating minus-zero with ceil()
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            Math related
 Operating System:   MacOSX Snow Leopard
 PHP Version:        5.3.8
 Block user comment: N
 Private report:     N

 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

IEEE 754-2008, definition 2.1.25: (...) All floating-point numbers, including 
zeros and infinities, are signed.


Previous Comments:
------------------------------------------------------------------------
[2011-11-26 08:29:34] athlan at vgroup dot pl

Description:
------------
---
>From manual page: 
>http://www.php.net/function.ceil#refsect1-function.ceil-unknown
---
You can generate a minus-zero, which is invalid number:

<?php echo ceil(-0.3); ?>

Test script:
---------------
<?php echo ceil(-0.3); ?>

Expected result:
----------------
<?php echo ceil(-0.3); // should return 0, not -0 ?>

Actual result:
--------------
<?php echo ceil(-0.3); // returns -0 ?>


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60393&edit=1

Reply via email to