Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123829 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 EB4061A009C for ; Tue, 25 Jun 2024 17:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719335809; bh=BmKngi4dUnGt4zLVj33X3o14KdO4Y0SfUT+p2pgdZ8s=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=F9YmLHO+y9M+J3crr4HHQznEITJme5fYAL0UABY1su/M8Zmb1y7Utz2PvpUh08pys i2vgfMCeunh0AY4YHUnHPcpI3hdGV5+Y5xNb8KByvTjcw5xIKTxDZRJ7wN9SBOfeA3 LrA6uN579ThnJkW+3DHHiBihrlhNurfqzMxmPFaELrSlRKQY+nHMYikaVn6J5nj8aP W/AcGFKYMVltgsxIHum363Gtf1N+rZOnZAk4CuVC8vro06bMGAeTE4uJ4Hrz7orV1L b1FpCxs38nAVnHNzSEwLK+h7e4RefP35XrkQaXnd+XWnv/rfpYE7hWE7bU0W7awBwl 5KMolq6dgh5/w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E6632180389 for ; Tue, 25 Jun 2024 17:16:48 +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=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING, 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 sender-op-o17.zoho.eu (sender-op-o17.zoho.eu [136.143.169.17]) (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, 25 Jun 2024 17:16:48 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1719335721; cv=none; d=zohomail.eu; s=zohoarc; b=OIjEu/PiSmsD2h9L81jHndtDX4vQf/X+6BM2nCNmVL3bv9i1x2GdHEZQQ187xEX+hnZbBaiNO1gyvJz35ffZIf5S9L7PUQ6hNMWJPB5zzEVA2D4hVrPTJ73YPl4HdbPKaLss+Rak9A+ufPPND/TPPpGf3UPXyosIC3WVydTvkgY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1719335721; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=/6xOlewW3K4KqEkc7s3VccdHL/TMv53gJrpypuuJyos=; b=NMBeOPbfykHq3RdwKCQ0RM559GwzpZW8CnvSGXKCW211DablT0Y+mghv3vmFZQS8Die3KDa6k12sg1LPz8lJw1mbb/1MoOWBO7ilLlHOPru06pBvzHkPmIGD/8pJhAg8eMC7b8v2kGjqNx7YIE6hMKzSW+Agb2yC7JDRRiqYl5w= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=barneylaurance.uk; spf=pass smtp.mailfrom=barney@barneylaurance.uk; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1719335721; s=zmail; d=barneylaurance.uk; i=barney@barneylaurance.uk; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=/6xOlewW3K4KqEkc7s3VccdHL/TMv53gJrpypuuJyos=; b=TZKoVVio9mBBgkiCylOzP9FzY3V4Xa1UkOz5hGovzkl47vRsdYJpIOfxRSrNB/QQ 9t9515IGh/68zNBL9cSQb/L6RtG/PYnRnFVgNbVNnjpikEoYXLt8SB5l7H1j7vfU13o q9wKiV8tGCys4M87gQ8KEUva7fBOLZDuv/L2164M= Received: from mail.zoho.eu by mx.zoho.eu with SMTP id 1719335720443649.3245087605306; Tue, 25 Jun 2024 19:15:20 +0200 (CEST) Date: Tue, 25 Jun 2024 18:15:20 +0100 To: "Saki Takamachi" Cc: "php internals" Message-ID: <190506515d4.f695d014203438.1450648485347018411@barneylaurance.uk> In-Reply-To: <0E1E1C82-24A2-46FF-B649-56DD7C39350D@sakiot.com> References: <190502bc4bf.1145fe1df199171.9215746182322416249@barneylaurance.uk> <0E1E1C82-24A2-46FF-B649-56DD7C39350D@sakiot.com> Subject: Re: [PHP-DEV] Add bcdivmod() to BCMath Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail From: barney@barneylaurance.uk (Barney Laurance) ---- On Tue, 25 Jun 2024 17:29:58 +0100 Saki Takamachi wrote --- > > Also, it is not practical to record the remainder in the Number object resulting from the division. This is because there can be objects whose division results are equal but whose remainders are different. > > In the discussion of the Number class, it was argued that objects should not have too much state. > > Increasing the state of surplus is not desirable in this respect, as it contradicts the previous argument. If anything I was thinking of recording the remainder in the the original number object, not the one returned (or possibly in something like a WeakMap keyed to it). So it does increase state and makes it technically no longer immutable, but that change in state would not be detectable from outside except by profiling performance. It's state that would have to be ignored in the equality check.