Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121297 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 1327 invoked from network); 13 Oct 2023 10:00:14 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Oct 2023 10:00:14 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8F2DF1804B4 for ; Fri, 13 Oct 2023 03:00:13 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS9370 160.16.128.0/17 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 ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 13 Oct 2023 03:00:12 -0700 (PDT) Received: from smtpclient.apple (softbank060067217005.bbtec.net [60.67.217.5]) (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 03DF3401DE for ; Fri, 13 Oct 2023 19:00:08 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sakiot.com; s=default; t=1697191208; bh=2GB8u5Ruvy/Np9EACU5KbKaTU5apYdvBan6YkpC5JmE=; h=From:Subject:Date:To:From; b=AfC81JA3HbYJT4cJO9cV35RbvPWAyyxffhPysfwsQZxiXyrJMtocnSI43QIp2FTDQ Dw9C9z4YgJqRTCxREwaSgcngzBTMgMUrZiTCxJ0Jb/pm4xcI9ZNKRHV4TkLnmRAbKD V5lg4a0wsdgE8f0lzPeZ8BDZC2yCIM8hpI66Cp9Y= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Message-ID: <3D2EA682-0BAF-47C1-8650-5A7015F7F5BB@sakiot.com> Date: Fri, 13 Oct 2023 18:59:55 +0900 To: PHP internals X-Mailer: Apple Mail (2.3731.700.6) Subject: [Round] Change the edge case of Round() From: saki@sakiot.com (Saki Takamachi) Hi, internals I'm working on fixing a bug in `round()`. There was a discussion about = what should be considered an edge case. For example, `0.285` is internally `0.28499999999999998`. Should this = be considered an edge case? Or is it not an edge case? Regarding this = issue, in 2008, the following RFC adopted the policy that `0.285` is = considered an edge case''. https://wiki.php.net/rfc/rounding Here is a PR for changes based on the contents of the above RFC. https://github.com/php/php-src/pull/12268 However, since FP is just FP, there is an opinion that it is wrong to = treat `0.285` as an edge case. This is PR based on such opinions. https://github.com/php/php-src/pull/12291 A new RFC is required to change what was determined in the previous RFC, = so I would like to hear everyone's opinions first. Best regards. Saki=