Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124420 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 747461A00B7 for ; Sat, 13 Jul 2024 14:02:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1720879410; bh=3uJeMD6qnl+TCiuPymbDQ6xzfrCTZDMhFahFEVQ3ZZk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=ia7jfbEMzrayLROQMA6SvsHfGN33uGZQGJZB9LqHQkMA9qxch6r0g1dVc06Km21aV SDE0YkR2/GfAfiFaPqVPUD30op2eqoBrkEi2GaU7lIt1L3gPGisXDoW6J9ert7m5s1 pgOctMJSND/k+bbf/+Z2UGxMfVzhxxfnrUwmW32amjYI/CCIreMNwoXQBjAoWmiZFa VXFa4PWoV3Dejeb88nA1V7LMMveXxi2eE5KbtwDytS30KAquRjexCkSJGaAS+zd3vd JA03GnwHGpaOYnMoOMKqGmYfIX1bShrxV/mKDjMr/KkyYaQ7sVDs6xzVeu9sb5ZB76 0EEAnMe3eilPA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 45F4418054C for ; Sat, 13 Jul 2024 14:03:30 +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=2.1 required=5.0 tests=BAYES_50,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail.sakiot.com (mail.sakiot.com [160.16.227.216]) (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 ; Sat, 13 Jul 2024 14:03:29 +0000 (UTC) Received: from smtpclient.apple (unknown [117.55.37.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.sakiot.com (Postfix) with ESMTPSA id 6C7E9401FB; Sat, 13 Jul 2024 23:01:58 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sakiot.com; s=default; t=1720879318; bh=3uJeMD6qnl+TCiuPymbDQ6xzfrCTZDMhFahFEVQ3ZZk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=s6kaKJlDnmL7dsKrvhsFFIB5PkpaJNXChG2mn/LW0sNbUyGqAf6ssYMSUqVKsK1gb 2tUDdcrBe/daDURkhqybLGtggoQf66TveZZw2s71WEtvyJViSUSW3yTz21J8i3jp5P UBrpcrtIhir8oPWMFyA8Kp/mnrzjVcjYzp0GzWfc= Content-Type: text/plain; charset=utf-8 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: [PHP-DEV] Breaking change of rounding behavior in PHP 8.4 In-Reply-To: <2ec18797-60bd-4e11-adf3-c106c9699446@gmx.de> Date: Sat, 13 Jul 2024 23:01:45 +0900 Cc: Claude Pache , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <596bed4d-81a5-4cd4-8af6-1e2c54fd1ffe@gmx.de> <2ec18797-60bd-4e11-adf3-c106c9699446@gmx.de> To: "Christoph M. Becker" X-Mailer: Apple Mail (2.3774.600.62) From: saki@sakiot.com (Saki Takamachi) Hi Christoph, > 2024/07/13 22:30=E3=80=81Christoph M. Becker = =E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB: >=20 > Hi Saki! >=20 > On 13.07.2024 at 15:16, Saki Takamachi wrote: >>=20 >>>> On 12.07.2024 at 17:26, Claude Pache wrote: >>>>=20 >>>> See [1] and [2], which motivated the change. >>>=20 >>> Ah, thank you! I probably should have checked this more = thouroughly; >>> now even I can see that there was a *bug*, so it is okay for me to = stick >>> with the fix (thank you, Saki!), [=E2=80=A6] >>>=20 >>>> [1]: = https://github.com/php/php-src/issues/12143#issuecomment-1713465981 >>>> [2]: https://3v4l.org/3Q7BC >>=20 >> If this can be considered a bug fix, then I'm in favor of keeping it = as is. (I wasn't sure if this should be considered a feature addition.) >=20 > Well, if I call round() and tell it to round to zero decimals, and it > doesn't do it (assuming precision=3D-1), that looks like a bug to me. >=20 >> I will update UPGRADING with concrete examples. >=20 > Thank you! >=20 > Cheers, > Christoph I opened the PR. https://github.com/php/php-src/pull/14943 FYI, the test case for that value already exists :) = https://github.com/php/php-src/blob/520787bb93990b95d9cf6eaf063ca2b03b76a8= 7f/ext/standard/tests/math/round_gh12143_expand-rounding-target.phpt#L14 Regards, Saki=