Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103698 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 30970 invoked from network); 8 Jan 2019 00:58:05 -0000 Received: from unknown (HELO forward500p.mail.yandex.net) (77.88.28.110) by pb1.pair.com with SMTP; 8 Jan 2019 00:58:05 -0000 Received: from mxback10o.mail.yandex.net (mxback10o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::24]) by forward500p.mail.yandex.net (Yandex) with ESMTP id C1A8C940152; Tue, 8 Jan 2019 00:32:02 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback10o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id iFAfD8w48H-W2mKC0Uu; Tue, 08 Jan 2019 00:32:02 +0300 Received: by myt6-fe24916a5562.qloud-c.yandex.net with HTTP; Tue, 08 Jan 2019 00:32:02 +0300 Envelope-From: semen@sam002.net To: Legale.legale Cc: "internals@lists.php.net" In-Reply-To: <5c33a5db.1c69fb81.eed82.f2ab@mx.google.com> References: <5c33a5db.1c69fb81.eed82.f2ab@mx.google.com> MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 08 Jan 2019 00:32:02 +0300 Message-ID: <53166921546896722@myt6-fe24916a5562.qloud-c.yandex.net> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 Subject: Re: [PHP-DEV] Proposal: change precision for output functions From: php@sam002.net (Semen Dubina) > 07.01.2019, 22:17, "Legale.legale" : > I think your solution by changing precision is not good enough because float summation is still not working properly. > > var_dump(0.1 + 0.7); > > returns: > > 0.7999999999 > > expected: 0.8 > Hi! If you are about the proposal, then '0.1 + 0.7 !== 0.8'. Why you expected 0.8? Check, plz: https://3v4l.org/Ughn2  -- Semen V. Dubina https://sam002.net/