Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123056 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 CC0E71A009C for ; Tue, 9 Apr 2024 13:45:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712670384; bh=4hW00cNiQYJkpM01Vv9TL1u8ogQxIe4EKPSbEaxXzZg=; h=From:Subject:Date:References:In-Reply-To:To:From; b=bp42GTnihdwvLHRSq3AM1H8+P0lkOCRma/2D9vMR7IRa/1FLvDwQD7CAf1SIbQEMG IFDriIspxGQLrQDBATMiUfNfMzOADKqn0Vex5rZi0kPyyRJN9/bTCljeriXfI13XvE Hy86JddoFI3vRsLAUYUiVS3V6dmWo8XvbBZ6eWwNL2tQoh2d4qEQt8j47HR4Qob9K/ swW2uxOwyOSAZztBG6QxRLACnlFNB1RLd/Cv5zp0b+IYRgmPZpM+pQnhtkJAbt/bmn HbfeZ1DDqg0al372q6EyU1WQHPkM6757f6tkn4Xr1Z2ahJABsu2gJnlP+rw2p5I1bh L2b6dPEUPnUkw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0E73D180004 for ; Tue, 9 Apr 2024 13:46:23 +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,SPF_HELO_NONE, 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.sakiot.com (mail.sakiot.com [160.16.227.216]) (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, 9 Apr 2024 13:46:22 +0000 (UTC) Received: from smtpclient.apple (unknown [117.55.37.250]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.sakiot.com (Postfix) with ESMTPSA id 2CBF2401D3 for ; Tue, 9 Apr 2024 22:45:46 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sakiot.com; s=default; t=1712670346; bh=4hW00cNiQYJkpM01Vv9TL1u8ogQxIe4EKPSbEaxXzZg=; h=From:Subject:Date:References:In-Reply-To:To:From; b=Ar8RxcRsr2UQrQpUrpKeEmNGsd6E8bQYnn5wLBhsVnTtJkDNW0Frh2ZuSqhMilnm2 gsD/sostNO+aSmDTj13zeD5mDzYVXMy3nlhl9hKd8yKs/cldgOFLQNmJRrIOexcVFN 4UdhXkta4gqiI65m7wnRUVY17zyRTmItHAdaKIR0= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (1.0) Subject: Re: [PHP-DEV] [RFC] [Discussion] Support object type in BCMath Date: Tue, 9 Apr 2024 22:45:34 +0900 Message-ID: <2AD7009E-EC77-4AAB-85DB-D779554CBDD6@sakiot.com> References: <4F094EDA-5058-407D-AF39-06FD934FDE1F@sakiot.com> In-Reply-To: <4F094EDA-5058-407D-AF39-06FD934FDE1F@sakiot.com> To: php internals X-Mailer: iPhone Mail (21D61) From: saki@sakiot.com (Saki Takamachi) Hi, To be honest, I think it would be much easier to use if we could make it loo= k like this: - Use precision instead of scale - The default maximum precision is 20 digits - The default rounding mode is HALF_UP - The constructor takes only $num arguments - The method can optionally specify any precision and any rounding mode when= calculating - Operators always use only default values =E2=80=8B=E2=80=8Bin their calcul= ations However, BCMath has worked with scale for a long time, so I'm not sure that i= ntroducing precision behavior here would be of any benefit to users... Regards. Saki=