Bug #80144 [NEW]: if you go to do the sum is 0, but php returns 3.3306690738755E-15. Why?
| From: | daniel dot maoloni at gmail dot com | Date: | Thu, 24 Sep 2020 08:43:22 +0000 |
| Subject: | Bug #80144 [NEW]: if you go to do the sum is 0, but php returns 3.3306690738755E-15. Why? | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-229196@lists.php.net to get a copy of this message | ||
From: daniel dot maoloni at gmail dot com
Operating system: Windows 10 Pro - XAMMP
PHP version: 7.4.10
Package: *Math Functions
Bug Type: Bug
Bug description:if you go to do the sum is 0, but php returns 3.3306690738755E-15. Why?
Description:
------------
$a=33.460000;
$b=-34.870000;
$c=1.410000;
echo $a+$b+$c;
result PHP : 3.3306690738755E-15
if you go to do the sum is 0, but php returns 3.3306690738755E-15. Why?
thank you
Test script:
---------------
$a=33.460000;
$b=-34.870000;
$c=1.410000;
echo $a+$b+$c;
--
Edit bug report at https://bugs.php.net/bug.php?id=80144&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80144&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80144&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80144&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80144&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80144&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80144&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80144&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80144&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80144&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80144&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80144&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80144&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80144&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80144&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80144&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80144&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80144&r=mysqlcfg