Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124180 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 A73071A009C for ; Tue, 2 Jul 2024 17:05:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719939997; bh=guxc/Pf5KaAqUkD3OTBHKFfUO9QNHLv6aZsXPBYvktA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=SI0PdzxAg2Bxz1J/A/Kqbv5TAyoERaluccccP1VOg3h/7j1plUKCVvcU7KPg2UKW0 UBB9nBelprZX66NNhpa76E3DtC2bboCydskqUzZ9RB22KBfE1qDguqXf6V+TmVNAFt JglzUaT8xw5NqLoinuk66k+2KaTq7zZGz9Un3aRVGlC6cdXfXYPRgDQ2N6DxW8QSJZ lbY6qpp5kHo9+QWCKik5pQodWrl3nC0rFcwwUUAHcRTosAP2QNMLc3hzZDngB4IL+S nbRrmGvHfq6i3rMJD0kJsqLyRdasiDQ88xKN13GKCxCmvrX5UL6NkGx8h1VZ4qSpWm NMU47P+ezoXtg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7C55A18004A for ; Tue, 2 Jul 2024 17:06: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,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=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-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (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, 2 Jul 2024 17:06:36 +0000 (UTC) Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-2c80637d8adso2693253a91.0 for ; Tue, 02 Jul 2024 10:05:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719939914; x=1720544714; 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=guxc/Pf5KaAqUkD3OTBHKFfUO9QNHLv6aZsXPBYvktA=; b=eRtz2K3hpEKwAn38B2j9PIlQhZYn2pv2VscQrHLDcjTO/CEPlzMadMEAcnyY2/fowu t/cTHKCdyQduyjb+Y9tLVn7fFZvQND1DQ4FxcdUL5cQWekGX6AvwquyKN9gcHB7U4g3x NzVN5SmR1R27SDOIq3jIk08aHKSlSHN8rDsm6pxxyDd+RCTu0LdPTv3o6b8/LCghSzuS 7QyVdWbIuwfcVarm9BVy0eYewNpQebHBf5Ea1bCjej0M6k7AoMyu5rMDzXBJgEVlA+U9 NNVLfd9HI5TfC+ZREQKJxg6dI792zt0b60SPPdu81XQgUa/8dANN4RV+HJ0SBWqLsoVz sJJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719939914; x=1720544714; 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=guxc/Pf5KaAqUkD3OTBHKFfUO9QNHLv6aZsXPBYvktA=; b=sSPzMjmz/gnpqxKf/K6WWMxI75jEBff6ZdENtNcYT7hIlaP+i8fc2jOlh2xl0b1bDV tDz4QSDxsj+VMp7sAzmzGMDHAixlM706Xc0JncHLiipt2w7Zvl7lT1GBQHs4jQWFlAvm l2Ny1Mpwj2frv1AD/Vrl8LrEte1wu25ktu2/gme3Ac4oHDwx/eztN9koOnHGV+nq5s7X EtqUsi+C4BcRVGKlMUu1dPxKExRbwOddeB5rgSS2dVcAqlnfN3gn2YU9imEc96mfJVks nvcQbDq656F0C076ESPaZeVvr6PU+ZLNeozZXFjwZk+Tpda7/hMg2uvE+szdlbplb0+O SOQQ== X-Gm-Message-State: AOJu0Yzt0bj1B6bR/wUwC/nnvou64F/+xKpHlNra0kkw7mBR//RAvMMi cBPzMP9CRQwNI7QlbRGMvHqsR6Ex3H+OlHbww5MGk5c2C3M9VvZZw24kuNERaPV5WnG+Fzt2NiB HeEWDmnW9ST/ASH7lv0BXHnLpQJzcvg== X-Google-Smtp-Source: AGHT+IEBzTh3krlSJrChH90IIrGGVlEWhVnDw8Y0ud7H6WNy+T/On7UagPDJsgM18fiqm357iLe7Ho2R0E9Aw18yJ2I= X-Received: by 2002:a17:90a:e912:b0:2c8:e1ed:6070 with SMTP id 98e67ed59e1d1-2c93d76f2dcmr5224024a91.41.1719939913664; Tue, 02 Jul 2024 10:05:13 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <101A7B8C-6BC3-4E9D-A5CB-059380E34332@sakiot.com> In-Reply-To: <101A7B8C-6BC3-4E9D-A5CB-059380E34332@sakiot.com> Date: Tue, 2 Jul 2024 10:05:02 -0700 Message-ID: Subject: Re: [PHP-DEV] Re: [RFC] [Discussion] Fix up BCMath Number Class / Change GMP bool cast behavior To: Saki Takamachi Cc: php internals Content-Type: multipart/alternative; boundary="00000000000096d335061c46b7b6" From: jordan.ledoux@gmail.com (Jordan LeDoux) --00000000000096d335061c46b7b6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jul 2, 2024 at 4:06=E2=80=AFAM Saki Takamachi wro= te: > Hi all, > > > Hi internals, > > > > Created a follow-up RFC for the BCMath\Number class. This RFC also > contains proposed changes to GMP's bool cast. I have proposed similar > changes to BCMath, so for procedural efficiency I have combined them into > the same RFC. > > > > Note that although they are combined into one RFC, these votes are take= n > independently. > > > > https://wiki.php.net/rfc/fix_up_bcmath_number_class > > > > Regards, > > > > Saki > > > Added changes to RFC. It is a proposal to remove all rounding during > calculations due to convenience issues and the fact that the functionalit= y > is "excessive" to begin with. > > To be precise, it will have the same truncation behavior as the existing > BCMath function, making it impossible for users to change this behavior > during calculations. If the user wants to perform rounding, they must > always use the `round()` method. > > Regards, > > Saki This seems positive to me. Rounding being explicit makes more sense. Jordan --00000000000096d335061c46b7b6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Jul 2, 2024 at 4:06=E2=80=AFA= M Saki Takamachi <saki@sakiot.com= > wrote:
Hi a= ll,

> Hi internals,
>
> Created a follow-up RFC for the BCMath\Number class. This RFC also con= tains proposed changes to GMP's bool cast. I have proposed similar chan= ges to BCMath, so for procedural efficiency I have combined them into the s= ame RFC.
>
> Note that although they are combined into one RFC, these votes are tak= en independently.
>
> https://wiki.php.net/rfc/fix_up_bcmath_numbe= r_class
>
> Regards,
>
> Saki


Added changes to RFC. It is a proposal to remove all rounding during calcul= ations due to convenience issues and the fact that the functionality is &qu= ot;excessive" to begin with.

To be precise, it will have the same truncation behavior as the existing BC= Math function, making it impossible for users to change this behavior durin= g calculations. If the user wants to perform rounding, they must always use= the `round()` method.

Regards,

Saki

This seems positive to me. Rounding be= ing explicit makes more sense.

Jordan
--00000000000096d335061c46b7b6--