Bug #80274 [Opn->Nab]: Simple addition and subtraction, but the result is messy.

From: Date: Fri, 23 Oct 2020 06:36:58 +0000
Subject: Bug #80274 [Opn->Nab]: Simple addition and subtraction, but the result is messy.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229862@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80274&edit=1

 ID:                 80274
 Updated by:         sjon@php.net
 Reported by:        2007 dot liufeng dot love at gmail dot com
 Summary:            Simple addition and subtraction, but the result is
                     messy.
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Math related
 Operating System:   CentOS Linux release 7.8.2003 (C
 PHP Version:        7.3.23
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

See https://floating-point-gui.de/ for a longer
explanation


Previous Comments:
------------------------------------------------------------------------
[2020-10-23 06:34:59] 2007 dot liufeng dot love at gmail dot com

Description:
------------
Simple addition and subtraction, but the result is messy.

Test script:
---------------
var_dump(1011.55 + 228.83 - 1240.38);

Expected result:
----------------
0

Actual result:
--------------
float(-2.2737367544323E-13)


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



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


Thread (2 messages)

« previous php.bugs (#229862) next »