Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122769 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 A65A21A009D for ; Wed, 27 Mar 2024 00:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1711500088; bh=UOrjf4rkXUsT27dqCmnYiwL78bVQJA9uqkMCftq8OYI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=ex0W6fCbF1wu6ks2owijC2xeRfpDuHIkbv2JlUYKiA8Phs19aj7CydU1V1uFUDSsX 68MvRInOpVoPcK3okEUVK4APFolTctniwQik57/nun+3yLlyRbCe2y31+ly684INjE mtkEQT3DlUUWjnQUeYDY6Em04wlhGdVyLRhtzcpahdGV4+2C7j40/RR7/It4mUrWLI VLkuqUplBHyD/wsGZwcUZBgNOBDHxAhkh+1eQsHuhJJyWY0TotrI1vislKa1k/bHTs T4L8r9JRjytilmXBeRzcmZ85a7TrnVDdJ78jlrU2P4QlrjdKmDOMdmAdKnMkKL+5yk ub2iplG6EDhwg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8C27D180880 for ; Wed, 27 Mar 2024 00:41:26 +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.2 required=5.0 tests=BAYES_40,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 ; Wed, 27 Mar 2024 00:41:24 +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 3E79C401DD; Wed, 27 Mar 2024 09:40:58 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sakiot.com; s=default; t=1711500058; bh=UOrjf4rkXUsT27dqCmnYiwL78bVQJA9uqkMCftq8OYI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=n6R/sfKN4TXrj6RHs540509J2JIAzLBxvC3kY2pLJb5/Yto/CuyKz2PFG2mSxP3tQ zj58BxnwbpTIM0QGYvGXkNtqp3NQ4Dvk01n0e4ia5Pc5wV5rRUytLPcwOnveZhRTz9 pVQzsgNUdRM1oH9SR6m8fwXlr4iu9eX5Xhku//Oo= Content-Type: text/plain; charset=us-ascii Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: [PHP-DEV] [RFC] [Discussion] Support object type in BCMath In-Reply-To: <91111e11ee72ffd18e1a1b2412246d00@gliadin.co.uk> Date: Wed, 27 Mar 2024 09:40:45 +0900 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <94B21565-9129-4379-A720-F4EDDD0A8D84@sakiot.com> References: <4F094EDA-5058-407D-AF39-06FD934FDE1F@sakiot.com> <91111e11ee72ffd18e1a1b2412246d00@gliadin.co.uk> To: Barney Laurance X-Mailer: Apple Mail (2.3731.700.6) From: saki@sakiot.com (Saki Takamachi) Hi Barney, > Do we also need `toFloat` and `toInt` functions? Seems like using = explicit functions will be safer than casting. >=20 > For toInt I'd expect an exception if the value is outside the range of = possible ints. For toFloat it might be nice to have a flag > argument to give the developer the choice of having it throw if the = value is outside the range of floats or return INF or -INF, > or possibly the user should just check for infinite values themselves. I was thinking about those features too. However, I'm concerned that = proposing too many features will complicate the RFC and make it = difficult to get it approved. It might make sense to have a second vote on whether to implement those = features. Regards. Saki