Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123039 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 7CE631A009C for ; Mon, 8 Apr 2024 11:31:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712575928; bh=Bxt5z0ZcMS9RrnoM+UNNkw282BswH7L7uJZCP1zhfEA=; h=To:Subject:Date:From:In-Reply-To:References:From; b=DkLS+fVySY71SANT2zAHiRHFOwI7N9x0F3QnwA/KwHibbcUx7mIQdA7HW+0s4A6ct bXJlkT3G7ECvwlafQGT6m893ZRszqn9F7SceMLQXa1N87ulTkxmg43/daYCfQx+fyt VfqCyRvcttCjLiiDY4fybX28ZJbP44AYb8TvVzeE+fgHizBrbmkSlsf3AN40jsqpGH /HmkXkiuQ3PV17mykEP6+YpXGtcH9zQZt8K0opM3OB+USmR/vWahMvZTR91zoMHFW6 SisZ5yDNgQR8rm/SS5kg7lXSfAxgctHBugt/033FwVbIrzDr6TTz4AshM28nea88uS nL/xsxKDdV7Ag== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A9CF41801DD for ; Mon, 8 Apr 2024 11:32:07 +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=1.0 required=5.0 tests=BAYES_50,DMARC_MISSING, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,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 gliadin.co.uk (gliadin.co.uk [80.82.115.221]) by php-smtp4.php.net (Postfix) with ESMTP for ; Mon, 8 Apr 2024 11:32:07 +0000 (UTC) Received: by gliadin.co.uk (Postfix, from userid 33) id CCB6CFA1FDE; Mon, 8 Apr 2024 14:31:34 +0300 (MSK) To: Subject: Re: [PHP-DEV] Native decimal scalar support and object types in BcMath - do we want =?UTF-8?Q?both=3F?= X-PHP-Originating-Script: 0:main.inc Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 08 Apr 2024 12:31:34 +0100 In-Reply-To: References: <40553F28-2EC2-475A-BD8E-1D6517AA2A51@rwec.co.uk> <2B518F62-B774-45C9-82A2-EF6653AAE34E@sakiot.com> Message-ID: <57c268e9be57edad86155c461b0fd181@gliadin.co.uk> X-Sender: barney@redmagic.org.uk User-Agent: Roundcube Webmail/0.7.1 From: barney@redmagic.org.uk (Barney Laurance) On 2024-04-08 12:17, Arvids Godjuks wrote: > Why not have decimal be represented as 2 64-bit ints at the engine > level Just to clarify this point, what's the formula to convert back and forth between a decimal and two integers? Are you thinking like scientific notation: decimal = coefficient * 10^exponent. 64 bits for the exponent seems excessive, and it might be nice to have more for the coefficient but maybe that doesn't matter too much.