Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121280 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 38308 invoked from network); 12 Oct 2023 18:32:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Oct 2023 18:32:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 239AA1804BC for ; Thu, 12 Oct 2023 11:32:27 -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_H3,RCVD_IN_MSPIKE_WL,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-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 ; Thu, 12 Oct 2023 11:32:26 -0700 (PDT) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1c9d407bb15so11536605ad.0 for ; Thu, 12 Oct 2023 11:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697135546; x=1697740346; 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=9FI0tJ7YSEPbNLfsSRgvG7/4gF1MocEnn6FcA/OCWfc=; b=cctNzMzhoEP/rExqnEXu6em4+bP/yHLIcKJSv0f6huyOkqq24s9Rql8WxUu9DC6npv NhONrR7Ybm+6xQ1PUHFv9cZqCQwRgCyfJ6HQ3Y82ShGJxbRktgfUxp9XkUocDtFvmzpL wgg8AXrPsnEt0FQTN3PH7GH0etwN/ZiZbKVbW94hQoEgOqo1WpmoWwdWJCbGtdL6avmy Rm3ZM3WndPqLho4lVh06DyouQqHoq/igf7k+kDhpYwLo5pQ9iHYIot1Hw35enoQtt24F OWMm70RBo0qjj19iqFrmjUU9m7OySMHSrYIg9J43Bl/vMdGkUIsO5bLsDFH2vWvzyViz xYaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697135546; x=1697740346; 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=9FI0tJ7YSEPbNLfsSRgvG7/4gF1MocEnn6FcA/OCWfc=; b=YUY9d6JdJjcMgFuq/GYAj5NiTSD6r2GP49F3yReTknfnO38DRDUDM/nG9zdfEQUh8L 2bigqhhjzEWk1lX42n1LxWavT468RmO5FchxYOZ4rgGCJfNpAPKJd3T5/s4M1MJ/DNvA jvEmdmEbzFgC5wF7E2PESL0vl0edxYa1UDqcFJOjyP9n/ao+NIPNnWMdlSNGKlx5xioI btdPhsL2yqS7VrwhidTA2gvFkoZ5SG4oEqSn9JWb09A0zA9tHhQgJlIEhpbia8Sy28n+ Noq55naYL2wmPyYQDmhFXvTi7mgsDU0rzkOGDanwYlBJuItitYzGmn7PXMSB6INRpCLD 2VvA== X-Gm-Message-State: AOJu0YxMDBTYoFOd4Gn0QfTUw7eUghPcZyqLLQo8lhmR/eZUEFRLhkfv PXvfucKP08ucQabOcXPr9INog69gxsMaaNbK9r8= X-Google-Smtp-Source: AGHT+IHYvCWbMKv/yvekFOXzmKRlRlXCQL/WPH5wKLU+v9q490KpRWDRWyQBrfRAHQl+Rz+4hONMv44HP/2h1VNahTU= X-Received: by 2002:a17:90b:8d8:b0:268:13c4:b800 with SMTP id ds24-20020a17090b08d800b0026813c4b800mr23489982pjb.21.1697135545456; Thu, 12 Oct 2023 11:32:25 -0700 (PDT) MIME-Version: 1.0 References: <9812BAD1-5003-4E91-BB3B-00637B9687AC@sakiot.com> In-Reply-To: Date: Fri, 13 Oct 2023 01:32:13 +0700 Message-ID: To: Jordan LeDoux Cc: Saki Takamachi , PHP internals Content-Type: multipart/alternative; boundary="000000000000529bc906078929cb" Subject: Re: [PHP-DEV] [RFC] [Discussion] Adding bcround, bcfloor and bcceil to BCMath From: pierre.php@gmail.com (Pierre Joye) --000000000000529bc906078929cb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Jordan On Fri, Oct 13, 2023, 1:24 AM Jordan LeDoux wrote= : > > > On Thu, Oct 5, 2023 at 5:27=E2=80=AFAM Saki Takamachi w= rote: > >> Hi, Pierre >> >> In fact, I predict that many use cases will be covered by GMP. >> >> Still, I think that there may be cases where calculation functions like >> mainframe BCD are required, such as when calculating money. >> >> I am unable to decide whether it is correct to deprecate BCMath and only >> use GMP. >> >> I'd like to hear other people's opinions as well. >> >> Regards. >> >> Saki >> > > GMP cannot be used in any reasonable way to implement things like sin() o= r > cos(). It is *technically* possible, but not at all reasonable. > it is the reason I mentioned mpfr, https://www.mpfr.org/mpfr-current/mpfr.html#Miscellaneous-Functions the challenge I noticed in a couple of threads recently is the mixup of radically different usages, like financial numbers with basic ops (+/- eventually *//) and others. they cannot use the same tools, most of the times. However there are libs with different types or mode of operations, which could be a better fit than what we do now. It is not an easy research and priorities need to be clear. BCMath is one of the worst and slowest implementations of arbitrary > precision decimals. > what I was trying to express :) best , > --000000000000529bc906078929cb--