Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123828 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 735AE1A009C for ; Tue, 25 Jun 2024 16:58:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719334778; bh=4CnT+aodTd4A3C+aYn00ALf3Ca6I2EgwoJ8dD7dn8kc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=jABCVAOU6VYMnPCdCdvVIjxhqmiJxq+kHeYzMS8SNz5QMx969R+qNTbZXhiJj/JcV 4kceUJbECPFbYLtThiwSkiFYz8HA2gOQ7sFu5O+FwezEi3f1ABHf4lXCvhHUqQMmT0 xwbDRTsodMBBlaeM8ZyVRvyMCj3xF8nolg1gAsJOdyGjiT0tzPoxoU6+mDrNzkK/AA zdo58BqUwcjkMdFS484hetyg3jaG1QizFNcM3p5bi7zclG6EC0mD6jhF0oU1xFytmb cs3SnaiSXs/dB9h/5iw4ECGNvgdu8P/qntGN6TlOweC4jhnLKfclKUIsAMudZeLzC/ XAkht8iJ6KzQA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D328F180389 for ; Tue, 25 Jun 2024 16:59:36 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) 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 ; Tue, 25 Jun 2024 16:59:36 +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 8BCA5401DE; Wed, 26 Jun 2024 01:58:16 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sakiot.com; s=default; t=1719334696; bh=4CnT+aodTd4A3C+aYn00ALf3Ca6I2EgwoJ8dD7dn8kc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=P7sLfu6TaStxP5BgJoPtSfG2Ib9VTC+0Io1uZMiV+1bSHTeRLw7jOvKirgc+1Wzg+ 843NHWiJqXC5m308E1yLb8VDa9uj7IjGiuUGaPyPeQ9c/OCUqRI9hdEA7Tr84UMpDg jY8JOSgyh3Rp28dovDGloBuPBavjqW9+TDZ5Gn7M= 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] [Discussion] Follow-up RFC for BCMath\Number object In-Reply-To: <1D8D71FE-20DC-40E4-BEA5-4B438B8BC825@sakiot.com> Date: Wed, 26 Jun 2024 01:58:03 +0900 Cc: "Gina P. Banyard" , =?utf-8?Q?Tim_D=C3=BCsterhus?= Content-Transfer-Encoding: quoted-printable Message-ID: References: <1D8D71FE-20DC-40E4-BEA5-4B438B8BC825@sakiot.com> To: php internals X-Mailer: Apple Mail (2.3774.600.62) From: saki@sakiot.com (Saki Takamachi) Hi! This is a reminder as the feature freeze is approaching. I would like to = restate my current opinion. > - Suggestions for using 64-bit integer types internally for = performance This is probably unnecessary. It's already fast enough, so it might be a = good idea to consider it when we need even more speed. Also, if we want = to speed things up even more, it would probably be better to change the = design of the bc_num structure. > - Points out regarding naming, such as changing "powmod" to = =E2=80=9CpowMod=E2=80=9D A function called "divmod" is also commonly used in other languages. If = follow that naming, "powmod" is not unnatural. Since "bcpowmod" already = exists, I feel that it is okay to leave it as "powmod=E2=80=9D. > - Points out regarding comparison methods For now, all comparisons are possible with just "compare", so I'll use = only one comparison method. This requires an override RFC. > - Whether existing BCMath functions should accept BCMath\Number At least not in 8.4. I don't think any ideas for how to use scale = properly will be finalized before the feature freezes. > - About the behavior when casting BCMath\Number to bool If the value is 0, it is treated as false, otherwise it is treated as = true. This alone may not require an RFC, but I'm planning to create an = RFC for the comparison method, so I'll include it there. > - Regarding whether the method you plan to publish is really necessary I decide to delete the format method. We can cast or get the value from = the property. In some cases, we may consider adding it again, but at = least not in 8.4. This also requires an RFC. Regards, Saki=