Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121215 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 1923 invoked from network); 3 Oct 2023 09:55:24 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Oct 2023 09:55:24 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D826E18004A for ; Tue, 3 Oct 2023 02:55:23 -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.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS34011 80.237.132.0/24 X-Spam-Virus: No X-Envelope-From: Received: from wp160.webpack.hosteurope.de (wp160.webpack.hosteurope.de [80.237.132.167]) (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 ; Tue, 3 Oct 2023 02:55:23 -0700 (PDT) Received: from [2a02:8109:b323:1700:e5f9:7932:39d4:19d7]; authenticated by wp160.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1qnc7e-0002Xa-H9; Tue, 03 Oct 2023 11:55:22 +0200 Content-Type: multipart/alternative; boundary="------------47YdLHHQm8ew01k5fjYKquGg" Message-ID: <63aec768-aa57-41dc-8aab-09caf217e17b@mabe.berlin> Date: Tue, 3 Oct 2023 11:55:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: internals@lists.php.net References: In-Reply-To: X-bounce-key: webpack.hosteurope.de;marc@mabe.berlin;1696326923;1770dec3; X-HE-SMSGID: 1qnc7e-0002Xa-H9 Subject: Re: [PHP-DEV] [RFC] [Discussion] Adding bcround, bcfloor and bcceil to BCMath From: marc@mabe.berlin (Marc) --------------47YdLHHQm8ew01k5fjYKquGg Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, On 03.10.23 00:48, Jorg Sowa wrote: > Hello, > > Recently I was trying to fix and clean some of the stuff within the BCmath > extension along with Girgias who helped me. I wanted to enrich this > extension with similar functions that GMP contains and improve the > performance, however, I went to some conclusions and stopped it. > > 1. BCMath extension isn't fast enough compared to other existing arbitrary > precision PHP extensions. Comparison: > https://php-decimal.github.io/#performance > 2. BCMath doesn't have OO API and thus it may break the backward > compatibility as Claude noticed. > 3. GMP GNU library provides support for float numbers, however, its > functionality is not exposed in the PHP extension. And BCMath doesn't > provide as many functions as GMP. There was an RFC back in 2014 from Sara : https://wiki.php.net/rfc/gmp-floating-point (never put to vote) and another one from 2013 : https://wiki.php.net/rfc/gmp_number (never put to vote). Also I think to remember about a proposal to have GMP natively supported for numbers in PHP but I can't find it anymore. > Kind regards, > Jorg Best, Marc --------------47YdLHHQm8ew01k5fjYKquGg--