Bug #73641 [NEW]: ceil function not work fine in special float number

From: Date: Fri, 02 Dec 2016 09:29:52 +0000
Subject: Bug #73641 [NEW]: ceil function not work fine in special float number
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-205734@lists.php.net to get a copy of this message
From: ufomoujie at gmail dot com Operating system: windows10 PHP version: 5.6Git-2016-12-02 (Git) Package: Unknown/Other Function Bug Type: Bug Bug description:ceil function not work fine in special float number Description: ------------ PHP 5.6.24 (cli) (built: Jul 20 2016 21:18:30) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies script: $value = 16.1 * 1000; $iValue = ceil($value); var_dump($value, $iValue); result : float(16100) float(16101) expect: float(16100) float(16100) Test script: --------------- $value = 16.1 * 1000; $iValue = ceil($value); var_dump($value, $iValue); Expected result: ---------------- float(16100) float(16100) Actual result: -------------- float(16100) float(16101) -- Edit bug report at https://bugs.php.net/bug.php?id=73641&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73641&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73641&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73641&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73641&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73641&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73641&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73641&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73641&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73641&r=support Expected behavior: https://bugs.php.net/fix.php?id=73641&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73641&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73641&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73641&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73641&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73641&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73641&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73641&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73641&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73641&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73641&r=mysqlcfg

« previous php.bugs (#205734) next »