Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121992 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 59949 invoked from network); 12 Dec 2023 21:26:31 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Dec 2023 21:26:31 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A9975180031 for ; Tue, 12 Dec 2023 13:26:46 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (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, 12 Dec 2023 13:26:46 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 5DD6C5C0303 for ; Tue, 12 Dec 2023 16:26:28 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Tue, 12 Dec 2023 16:26:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1702416388; x= 1702502788; bh=SwB6yDwQJVH/OsLVoFeyADijNWpUONLR58XUj4gL138=; b=j es+a7TcT3PDE8NAkl/cdTFQcinbJgJm/vFdQB17owu7C5WecoTolTVcKroGtcfbp N2l9ORHbYFuuyL1ZpiTWR7df0OVPa1XRPH3UXj1ndSWzatGor83xEqljum5MIO3T amwV7oVMqmvAlK7WqRvRiEVs6MVb+MYv4trCwASMfw7UtQ00xSB3plLcQtzGDOgK IVyCRZXxvJvSbm/eKjTH2TSqVO0B9t8+0bQBFXTJwAohjX/rcYonFEGMwQn+N6pE 0YjXgkLyDH1jXsirjUp9e3GdtlDBMBTrVasZe0ew58Bex3JDmjnPVLbl7zylt/Nd JsQCLwMqqXP4w8/YXdSxw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1702416388; x=1702502788; bh=SwB6yDwQJVH/OsLVoFeyADijNWpU ONLR58XUj4gL138=; b=CUgVV7BSKPOhune03NlNt/HhRqR1N+vP5WpZsFuFojrb Kd24OkygzGvtH1cJRiMLwOHApUprVU+baHHALocRs3A5viiSa8SpgtElbsHNz+m8 N2sDD0tXtd+xkUeeNeWOHIq0RtEfk1gRbaqCBJwVfH8nyShLZ3S4hBNiiIGiMAMs 3bo76ENVteaOUZYGmt19FqtmqS8wGEDtuTCzrfqQ033iYhBFjp8rPHQBTuyczi2s qsJj5jRloCoUrUspLukMeknRx80c6PaWi/clRuV6ih/0tUI1nhG6OgjboyVOMs4y 3GY3Bv8xnew5C4pjOoDY3bnj5mjRUNs3uqNIzyKc4g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelgedgudegiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepgeelgfekudeivddvteffueejffdthfejieevhefg ffekudevkedtvdelvddvffefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 026971700097; Tue, 12 Dec 2023 16:26:28 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1283-g327e3ec917-fm-20231207.002-g327e3ec9 MIME-Version: 1.0 Message-ID: In-Reply-To: References: <18c42fdbb30.2831.17a3710df6d58f02ca570cc47e197a63@interi.co> Date: Tue, 12 Dec 2023 21:25:44 +0000 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] Proposal: Arbitrary precision native scalar type From: larry@garfieldtech.com ("Larry Garfield") On Tue, Dec 12, 2023, at 1:03 PM, G. P. B. wrote: > The issue is that I don't think having arbitrary precision decimals as a > core language feature is a necessity compared to rational types. > A cast from rational to float wouldn't produce a large round trip, whereas > trying to figure out arbitrary precision is more difficult. > But in any case, having a declare/INI or whatever that changes the > behaviour of the engine/language is not a good design choice. I don't have strong feelings about arbitrary precision decimals either way, but I do strongly agree with this point. Having the language behavior (including the precision of numbers) change with an ini setting is long-understood to be a bad idea, and we've been trying to phase it out. A decimal feature that relies on a language-affecting ini setting is just not going to fly these days, IMO, and rightly so. I am curious, GB, if you're proposing an actual `rational` type, which stores values internally as just numerator and denominator separately until some point when it renders down to a float (eg, on print)? That sounds neat, though I am nowhere near expert enough in that area to say what ugly edge cases that might run into. --Larry Garfield