Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121210 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 68880 invoked from network); 2 Oct 2023 22:48:41 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Oct 2023 22:48:41 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A98A7180503 for ; Mon, 2 Oct 2023 15:48:40 -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,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (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 ; Mon, 2 Oct 2023 15:48:40 -0700 (PDT) Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2b9d07a8d84so2979221fa.3 for ; Mon, 02 Oct 2023 15:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696286918; x=1696891718; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZJy7PIuy0/cp3BvQGJWQvpuJbmG9gxsUsqsJIgykJTY=; b=Jo4Fh8T/QsxvMMkjErobuc3DMsyiJaM5pThWyvmUDdR7EMN5+azx7d/B0slIFLZE9P zcXZDqK6c8gHzRbEI5XMq3rsZRmTBb1d91QMyIJ94zWbSot4+hZMmEbznUDYIVz7OSAZ 6270TQkYbdWXW3rIfrNWH5z8tXUAJsquUmNqhjGtTWW5enbrz+4HPuJUQFcknGf413Rm T++GvWwnrqWeNUp5ooq+m+gxVlUiMd53I4mkNvGeoQ1bjo8Ymsn5D/9PZcFqVw7/UIp/ 4rX9lnla5jjfew2SG2b7cfUvjKJezzRiFnjAayffv6dh4HydAAL5OikszNgOeCzv3w4g z8hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696286918; x=1696891718; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZJy7PIuy0/cp3BvQGJWQvpuJbmG9gxsUsqsJIgykJTY=; b=DMPedjqTGZ2rbor78aL15l2GA1gNB04TZ6ZQpGbjTYXRPSCH3lt87kX0TZ91GRcKcV 6L86bTRa/NR0VJKK7BNIscjpa+GpysLaL/ltDLRQATFpcHwTVCrQwLYQXGabbfeMVZry +hjOnBl4mZJCf+39xVxbO4ZIGlSpTlrmGHeQvpQKqX2AwmAVMobs4RL9kUZtGCcxWPma PsAZsIymQF/KLoPtMN2xQaDFgNxHKTodwNM0Z27SXXDKFApvilB+GpNEV6S5H+FOi0AL vzIRoykk6JUAGQq4ZCfofm7S4yELW0byK3JQ41oyygpiVGJU2/K7Q7xFBn18BFxHoDaQ 09Rw== X-Gm-Message-State: AOJu0YzKk1ejp5HDcIXNMDuT3Py5agQJ8+YVaxw884OZFLwVJC56Rp5D uOQ0cLWoW6haNf291D9HSRYCAyEYYLxyqcgghb1WtbT3VmI= X-Google-Smtp-Source: AGHT+IH2+J3brxFG4DRG9UUjNkXsYtEhbhgEdlclohV7X0+sRVXNlYMpmz2jBtPNRGhdecbXFs0r5LutrcVp6C4Pf30= X-Received: by 2002:a2e:7d0a:0:b0:2b6:a827:164f with SMTP id y10-20020a2e7d0a000000b002b6a827164fmr10356937ljc.10.1696286917779; Mon, 02 Oct 2023 15:48:37 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 3 Oct 2023 00:48:26 +0200 Message-ID: To: Saki Takamachi Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000002be82b0606c39358" Subject: Re: [PHP-DEV] [RFC] [Discussion] Adding bcround, bcfloor and bcceil to BCMath From: jorg.sowa@gmail.com (Jorg Sowa) --0000000000002be82b0606c39358 Content-Type: text/plain; charset="UTF-8" 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. And I understood that the BCMath extension should be abandoned eventually when the GMP library is properly extended. There is no need for 2 arbitrary precision extensions complementary to each other but for the rich one having all of the functionalities. I don't want to discourage you, because there is clearly a need for such functions. Speaking from my perspective I would rather invest time into the GMP extension than extend the BCMath extension. If anyone also thought about this direction I could help and join forces to have one proper math library in PHP. Kind regards, Jorg --0000000000002be82b0606c39358--