Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96477 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48381 invoked from network); 19 Oct 2016 12:48:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Oct 2016 12:48:54 -0000 X-Host-Fingerprint: 176.248.3.153 unknown Received: from [176.248.3.153] ([176.248.3.153:26173] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 09/75-14749-5BB67085 for ; Wed, 19 Oct 2016 08:48:53 -0400 Message-ID: <09.75.14749.5BB67085@pb1.pair.com> To: internals@lists.php.net References: <073601d2296f$f27135e0$d753a1a0$@belski.net> Date: Wed, 19 Oct 2016 13:48:50 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40 MIME-Version: 1.0 In-Reply-To: <073601d2296f$f27135e0$d753a1a0$@belski.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 176.248.3.153 Subject: Re: Constants for better double edge case handling From: ajf@ajf.me (Andrea Faulds) Hi Anatol, Anatol Belski wrote: > Producing INF. There's currently no explicit way to produce INF and NAN, > whereby NAN is gettable with sqrt(-1). > > echo PHP_DBL_MAX*PHP_DBL_MAX, " ", -PHP_DBL_MAX*PHP_DBL_MAX; > INF -INF I'm not sure I understand this use-case. We already have the INF and NAN constants for obtaining those values, and the standard IEEE 754 operations which produce these values are implemented (1/0 for INF, 0/0 for NAN, etc.) -- Andrea Faulds https://ajf.me/