Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124410 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 2EAFB1A00B7 for ; Fri, 12 Jul 2024 13:24:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1720790753; bh=xe5/YKkjeh71Bg54DvOKYAtms1Q0kJ6rfxDxhFZwshk=; h=In-Reply-To:References:Date:From:To:Subject:From; b=W6JIeLHDwvcPhBIt9hLmMNQARYCEuU2XUEA4H5TPY9uwVJhE7Agd9+Kn9pRFngy0l YN9WYRYGUhEWZQXo3MINRJ7a+UpSIwK4QtGYPHFSpCxzfcJpqhFiRAmn15w2HF4X3T 3oVYV6/de4eLW9yDtTXnbEYkmbDiwidCn3KzpG+OXkY2fAErQO7XKqUWBysCSTGh34 O9EWz1qBCVmm8IepgSrvD08ny/GAqVyeSBUqa4KBj93G3+JrFz2kEViHOeXrlw0WQk 1/okaBHzWE6KOxUssSSbV/HKbnQ6uTsKzGSc9l9xCN3OozQcIrnABCXcdrgBOCsJCo Psp8cuBLmJAAw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5E18A1805C0 for ; Fri, 12 Jul 2024 13:25:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh1-smtp.messagingengine.com (fhigh1-smtp.messagingengine.com [103.168.172.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 12 Jul 2024 13:25:51 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 095C1114127E for ; Fri, 12 Jul 2024 09:24:24 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by compute1.internal (MEProxy); Fri, 12 Jul 2024 09:24:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1720790664; x=1720877064; bh=CgCIcn/vEh SS6HjHEWZepJ2GNgYTBSYx+CfMqDG/940=; b=j7UPoBMaJA9FcnpYH/C+Iv6zaI /K4r/YVEzmoc9BYOQGClnmhnolrnoBVm03dVjMUAIRQ7usVSpclz/YRSbTRN2e5O dGO8CLJU+KiWAuF+64c0wcwuGbcp5UberkHPYxPp1YxUiWIgVqNOBO0Z7MgZrwTN kCYSDMtOFIF/793rTaylTJvbzp25seE1rkmDWSPU1HFfvpdBUa8HuQ/vP+lHku5y Mhr9DaNO/4eZusfx9BSYBH7NANkR+Lh61YPXbvPIobL+l9Ybpqw38T+trHmc3cwE K1d2n9+qVSRP7uOE3v0q0n8gZCQuLMJeGhaj186fmT/Jq/LaTozkwFslZnfQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1720790664; x=1720877064; bh=CgCIcn/vEhSS6HjHEWZepJ2GNgYT BSYx+CfMqDG/940=; b=qYT4nknSd9lmJcBWImMa1K9WTqu+kW7eh8fiKgIjsZBs UsO79vMWJ9SBXGS9mtwJUt6DRZwdruxJJJ+aJrUBVrq/XBelMKGROVl2FUnYad4D vZ/xHal7bW9s8G2inGSfM4DikRzM8EXa0nSDv9vEoyOXz7Oy+Oz6S2z1af/WRPZW toxIPxBPjc3rihnjWfwPtRSo1nemKT767KRCJ7vEyc2zDgTomq8f8PUdBsTn4CrR yYY7FhcoCwiHzPj9eRTLMt9YNiTPeoW7TQXje9GJTl6z69h+QAtv8t9UWOGExNy6 inyAgqr5VbtiVfmk3sayKyL1Y4b3wQ+FAQiVOc+waA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrfeeigdehkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesrgdtre erreerjeenucfhrhhomhepfdftohgsucfnrghnuggvrhhsfdcuoehrohgssegsohhtthhl vggurdgtohguvghsqeenucggtffrrghtthgvrhhnpeeiffffhfetjefftefgfefhvdejie evtdehueegleeggfevffejheehtddvledtheenucffohhmrghinhepghhithhhuhgsrdgt ohhmpdefvheglhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehrohgssegsohhtthhlvggurdgtohguvghs X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 5962815A0092; Fri, 12 Jul 2024 09:24:23 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-568-g843fbadbe-fm-20240701.003-g843fbadb Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: In-Reply-To: References: Date: Fri, 12 Jul 2024 15:24:00 +0200 To: internals@lists.php.net Subject: Re: [PHP-DEV] Breaking change of rounding behavior in PHP 8.4 Content-Type: multipart/alternative; boundary=fd48c54ccd834499bc5376ff381f6c33 From: rob@bottled.codes ("Rob Landers") --fd48c54ccd834499bc5376ff381f6c33 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Jul 12, 2024, at 13:24, Christoph M. Becker wrote: > Hi all, >=20 > there has been a "small" change in the rounding logic of > _php_math_round()[1] a couple of months ago. A respective ticket, > claiming the new behavior would be a bug[2] had been filed a while ago > without proper triage so far. I'm bringing this to your attention, > because I'm afraid that there will be (many) more bug reports about th= is > in the future (note that the change only affects master, and only PHP > 8.4.0alpha1 has been released yet, so it is probably not widespreadly > tested yet). At the very least we should be sure that we want to keep > this change, and document it well, to avoid discussions in every filed > ticket. >=20 > My personal stance on this is simple: floating point arithmetic is not > exact per se, and changes to how PHP handles the details should only be > introduced, if they clearly improve things. This change apparently > improves some cases, but worsens others. Thus, I think the change > should better be reverted, and if at all, postponed to PHP 9, since I > neither regard this change as bug fix nor as a feature. >=20 > What do you think? >=20 > [1] > [2] >=20 > Cheers, > Christoph >=20 I guess the real question is: how many of these numbers should be the sa= me? https://3v4l.org/tgRMc/rfc#vgit.master =E2=80=94 Rob --fd48c54ccd834499bc5376ff381f6c33 Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Fri, Jul 12,= 2024, at 13:24, Christoph M. Becker wrote:
Hi all,

th= ere has been a "small" change in the rounding logic of
_ph= p_math_round()[1] a couple of months ago.  A respective ticket,
=
claiming the new behavior would be a bug[2] had been filed a = while ago
without proper triage so far.  I'm bringing= this to your attention,
because I'm afraid that there wil= l be (many) more bug reports about this
in the future (not= e that the change only affects master, and only PHP
8.4.0a= lpha1 has been released yet, so it is probably not widespreadly
tested yet).  At the very least we should be sure that we wan= t to keep
this change, and document it well, to avoid disc= ussions in every filed
ticket.

My personal stance on this is simple: floating point arithmetic is not=
exact per se, and changes to how PHP handles the details = should only be
introduced, if they clearly improve things.=   This change apparently
improves some cases, but wor= sens others.  Thus, I think the change
should better = be reverted, and if at all, postponed to PHP 9, since I
ne= ither regard this change as bug fix nor as a feature.

=
What do you think?


Cheers,
Christop= h


I guess the r= eal question is: how many of these numbers should be the same?
=


=E2=80=94 Rob
--fd48c54ccd834499bc5376ff381f6c33--