Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126775 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 864AF1A00BC for ; Sat, 15 Mar 2025 00:14:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1741997536; bh=yUEeSMEcRolyjcDhvKNAREhYMPQLatC5MqNY59gb4fg=; h=From:Subject:Date:To:From; b=ceraWzuUX+CwYRcdrY1A8qMNPXFCzclPzjRNg5eGLZfz4Uu3AOiWp9SIe4Go1Qiko pD/gp7eSoe93fyoRLhtnoHsI0gudwcHuR3PsTQqyjs0ofCB6GEmrHcf1gAurN+941a eAMZqg9DChhcExKwf21Qh9RZdLyq/bhiWKorzLcTpX4S+fnAd629Fjl7M9AjXV5qOb xUIb1BUaJ+3vOWoOQdeW/8fAy/gNmMRcOrpiVbIVn+DsvsEgPWCKJEU2bFO+eI75sc srqpWmyvvyLfpMLGMnWzA75PJQLjeqyvHGHUpOJTeD4P3duMRhd5DVPlls9oMY7Uws kRa5CWL3OvaKQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AEFEA18007D for ; Sat, 15 Mar 2025 00:12:14 +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.9 required=5.0 tests=BAYES_00,DMARC_PASS, SPF_HELO_NONE,SPF_PASS 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 ; Sat, 15 Mar 2025 00:12:14 +0000 (UTC) Received: from smtpclient.apple (unknown [117.55.37.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.sakiot.com (Postfix) with ESMTPSA id 2A26F401F4 for ; Sat, 15 Mar 2025 09:14:44 +0900 (JST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\)) Subject: [PHP-DEV] BCMath: Supporting scientific notation Message-ID: <38BC54BF-2839-47B3-9C31-417834BEEB49@sakiot.com> Date: Sat, 15 Mar 2025 09:14:31 +0900 To: php internals X-Mailer: Apple Mail (2.3826.400.131.1.6) From: saki@sakiot.com (Saki Takamachi) Hi all! In the following issue, there was a proposal to add support for = scientific notation in BCMath. https://github.com/php/php-src/issues/17876 I agree with this and have already created a prototype. https://github.com/php/php-src/pull/18068 The prototype allows to pass scientific notation values =E2=80=8B=E2=80=8B= to both functions and classes in the same way as normal numeric string. The Number class could add a method to convert strings to scientific = notation, or it could simply not accept scientific notation in the = constructor and create a dedicated static method for it. We can also choose not to accept scientific notation in BCMath = functions. Could you please give your opinion on this? Regards, Saki