Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123271 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 787711A009C for ; Tue, 7 May 2024 14:01:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1715090542; bh=xgEzBcWj0t9XtWaq8NE/HjF6ArH4urFPbpQWol74HkY=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=MxGTRnqWgOciqkVrGnsZZEoGy8Ju85AF48vVcgSLfoE9w0JGK3dA14lbL4/aubKog LqygBl8ah9J1bEzAeXDFetRxpR/liaSctchCsJ0V/ojgQJkN+D5EkSP74P1Fhu98wU D7IMiWjh49UqgPZ4rHy4xz1uceGgTacHHBOxqvFL4j3VCyk9wExMQqtXbblgu4ILkI RJDoX88mkIDm0b7inP89TSxtSmZWRzvtMjI6Oih+HcTKoS2KXp97VZ5aiOmG+1gBUc ZtXw/WsmjDp6qTDvjBaAUc/F9FsC5lZihgQFc1HwCL2GfIOO06d7Iq8ovNKDQ96cGD eq1K2MlYIOpqg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 34C4D180076 for ; Tue, 7 May 2024 14:02:20 +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,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) (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, 7 May 2024 14:02:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail; t=1715090489; x=1715349689; bh=xgEzBcWj0t9XtWaq8NE/HjF6ArH4urFPbpQWol74HkY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=o+tzzo3iv/gy4Y1n5fc6zWQIM593FbTJ6d69cVeg9EI3rpKyQcS/H2ib331QCSCDo 4egB3OQTPdArS9grFa4IlGovU2y33ROU321Qis1jbO+GjA3rMbbsFl3kRPg8z0/iFG shKGvchH0diz2u2DKnWmhfuhQv0VY/A+Meo/7PTB1FC4LsdIaNYyAlfuiAJVDcWRhw aBPRfmK+6i5LhEI7Qf03xzv3Y7F52G8mZAjfoFyvRClZxciKfvoFXY5tPmlu/RMhMn UUUyoABmBlr3qvP0SpvqNJECJ8BgMfuaA/13yLnCM4UpVsdbdCPJxcP7+eArQN7SO3 Q3jTx4vA55Bhw== Date: Tue, 07 May 2024 14:01:24 +0000 To: Saki Takamachi Cc: php internals Subject: Re: [PHP-DEV] [RFC] [vote] Support object type in BCMath Message-ID: <6Kx-yDO_RoWi8qV0NDhpziE5VX-cDF3g5RCEUjqh5iOnM2x2pWtYPz0j3bNUz-BdkkIVXXG38tu8fP9FuAiQYl2oDcTYAUivNn63B10Vw9I=@gpb.moe> In-Reply-To: <58283467-CABC-4868-A691-A52228C5296F@sakiot.com> References: <58283467-CABC-4868-A691-A52228C5296F@sakiot.com> Feedback-ID: 96993444:user:proton X-Pm-Message-ID: 5f1a9e04abe81e5543f225ad6107086d569f29f4 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Wednesday, 1 May 2024 at 09:55, Saki Takamachi wrote: > Hi all! >=20 > Voting for RFC: Support object type in BCMath has started. Voting ends on= 2024-05-16 00:00 GMT. > https://wiki.php.net/rfc/support_object_type_in_bcmath >=20 > Regards, >=20 > Saki I voted in favour, as Number being its own type should improve DX and perfo= rmance for small numbers as we can just store two 64bit integer, one for th= e integral and another for the fractional part. However, I have some remarks and questions. Apologies if these were already brought up, but I haven't gone through the = whole 100 long email thread. - The comparison method should either be called "cmp", or "compare" to alig= n with other extensions, the BC Math function being called bc_comp is weird= . - I don't understand why we are exposing lt, lte, gt, and gte what is the r= ationale here? Also, the naming is kinda terrible IMHO. - The "powmod" method should probably be called "powMod" - Are the existing BCMath function going to be adapted to handle the new Nu= mber object or not? - What is the behaviour when casting a Number object to bool? Does it alway= s cast to true like a "standard" object, or does a Number equal to 0 cast t= o false? - Considering the property hook RFC has been accepted, should the $value pr= operty be a "virtual" property or not? Best regards, Gina P. Banyard