Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124416 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 B14281A00B7 for ; Sat, 13 Jul 2024 12:44:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1720874746; bh=hQTyRZfsS27Ym9/pKb06eJsk/inERTdDx2wZr4/Eh84=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=UPmw3eMNHgshnw4kIjj4yc7OHccUTMdMOiv+8dRR0U8OUtr6Zj4qbvhhdA+VaUFbr O5ysIPm/GfYtsfXVe+1wPghbAXoJg6RfeNK89rE5ywVsvxv54y2UVCaZUnHbAiru7N wOD2Arfz4wkt+YOeS6FnuqXEMYgqNN8XtiV8xKRCdogvL+JYb6lHxZEeek9nq4Mntl b+x3jcncPyWt5YkqE+gwtu5JGbGIIat/eeZ5Kon33SM4s4O26kqxfgES9a1CLJhVDI D+Zryk6SBc9WnanWQACWFH9FOVdiYW1TYyQuLBPVCLgtLxAB8I9FuPDWZLCgawRhES PtXWDqH0NNUqQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 981F0180038 for ; Sat, 13 Jul 2024 12:45:45 +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_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) 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 12:45:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1720874654; x=1721479454; i=cmbecker69@gmx.de; bh=pEAw9m/5RE/3iaDsIJuLq739yXPbAAOyN8EL8yY1mek=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=gnicKVLwnQ4wSb80KL5BaG0DzjStbDZJD0lMUe4MWJaIoJGa6mwok/OIS6a9O76S TzkRM2XDLAHhtnYMEeuA99/3YY7rggr+/SLwTa1u7HAn5sPQDxkbi+jzGBWFPGSgg TWTVI+M41vMzVBW6/SXTWwTpCRFd/CWppFPbLhWMlBIwhjwrSydnDCoJPCfQd0Ugv uEU5exm7JWS1gaBaVCzeHEfHn4j2rd8aKyxqiYfEBXi35L1F+oIm0VH/X0tUYKWMi LVJlqFMqCUbdKbYH3lKQNrRpAG03vNMxbka+ugg1P1eITI9rYjqPIHrzol8lvuiXw EKbs5zSf/5EKFVeYbg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.2.130] ([79.251.222.223]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mzhj9-1s6wUJ32n3-00uohz; Sat, 13 Jul 2024 14:44:14 +0200 Message-ID: <596bed4d-81a5-4cd4-8af6-1e2c54fd1ffe@gmx.de> Date: Sat, 13 Jul 2024 14:44:14 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] Breaking change of rounding behavior in PHP 8.4 Content-Language: de-DE To: Claude Pache Cc: PHP Internals References: <8918688A-2EE4-443F-8FAC-DBF9957AAD51@gmail.com> In-Reply-To: <8918688A-2EE4-443F-8FAC-DBF9957AAD51@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:M02Dovt3Z2kHM/N1O+3SkA5QdNum0PnoqIoAbx4kD/0v3GQbjOa lFKQ64X6XFLWGRgHJR3D7sPwCqemkkfbQGm7IAgt57Abf+pap3niJonSEgo+WyYPaPJ627r NbnHcQ7NgiZbxwra6k+2VZIsya/bdUhi2PEMlxdo+aii4JtSb4uyFaNMn4LxJgh16XalHRM WKWzAanQbmIqWtKUiZcuQ== UI-OutboundReport: notjunk:1;M01:P0:WNzTi1JUdxw=;bBv+XhMVzRQE2XyqIMzuddrUYj5 gD/tWTmxT+RonJrlf4wAU8FEB5kZ0xbIu/RlSw1v4lwJrAT1YQYL4bDcIjVQu7QKzjuHYAlxE 9J2FPOaQKFqlz5A3OTUb1knSM6bP7hBmCEo5AdLlsL2TUP3osfNsu5tSLpidOEr0lM93rUWoC Fq02j9ZpfRM1GcC7wYiQ10ZXzq4Wh9BBjypo1myC5YDMRjFZm43nfou+0Reoft3iJPr1eMHgG Z8zOmNb/+3dn+0yIEBUesnduVCnAfI5RHRQFSyCv0dkPl8s4d2enf4AMT08PgwlTKfNW105w6 eJqMRljUysikL7lTcDbZ+R3IQVmpeQ0AAcMVpN7EVDZ+FV7JNTIhBo9B2jlKZwkNwh0IPqf85 C3wQ3hJzJX/5Qqzz4OFEBvzTTdy2QnxWW0GTEMEB2dXVFSRWGwlOpZ5LKit9JPzp7mt9tiQse Wmr/9uOxBWyUxn6lEBovJWHFc92MPisUSDzGyLbuQokirjrw6rBv5tAGsZGDvt/VHvExRB7rU Nus3lG3lqBVDg9dW1mEc5L7kFmO6zxc+7Bzl5gfiNSVF98a5CebqrqtQ9/Oy+mIQQrSea3tPq 7A+2smDVBekMbZrNxP1fu7+c1jhwFSeRtEqiu9Q/gL3xP56UPJGLXFLkSXTLTmOAJ06Et/FCd tdwIcnU3UOtFf9TFXy9ST3FOAGkosrriKVMBbqzqRTQDspe1JxK4yPOv80UiXg0FfRiR9i71s iJUP7C7OOddbNQvj0iZrsXywDY7rfuBheVtSWL6doRZw6Lfz6iSiWVc/Kq0ZSr6MeyXkO0B+o frR5wZ0fZYEwlAomh0m/Ft4OzxpGO8R8Tl+BUvGd6ZEoE= From: cmbecker69@gmx.de ("Christoph M. Becker") Hi! On 12.07.2024 at 17:26, Claude Pache wrote: > >> Le 12 juil. 2024 =C3=A0 13:24, Christoph M. Becker = a =C3=A9crit : >> >> [=E2=80=A6] 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. >> >> [=E2=80=A6] 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. > > See [1] and [2], which motivated the change. 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!), but maybe UPGRADING should clarify the issue a bit. Currently, it states: | The maximum precision that can be handled by round() has been extended | by one digit. While that is technically correct, probably few readers understand the implications. > I expect that `round($anything) =3D=3D (int) round($anything)` for any f= loat between PHP_INT_MIN and PHP_INT_MAX, and I think that the change fixe= d that . It seems to me that this is a reasonable expectation. > Therefore, I am for keeping the change, and ensuring that there are test= cases for 4503599627370495.5 (the largest float with fractional part). Makes sense (unless there is already such a test, of course). > [1]: https://github.com/php/php-src/issues/12143#issuecomment-1713465981 > [2]: https://3v4l.org/3Q7BC Cheers, Christoph