Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96490 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71931 invoked from network); 19 Oct 2016 14:15:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Oct 2016 14:15:09 -0000 X-Host-Fingerprint: 176.248.3.153 unknown Received: from [176.248.3.153] ([176.248.3.153:9213] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D1/8A-14749-9EF77085 for ; Wed, 19 Oct 2016 10:15:08 -0400 Message-ID: To: internals@lists.php.net References: <073601d2296f$f27135e0$d753a1a0$@belski.net> <09.75.14749.5BB67085@pb1.pair.com> <08ce01d22a12$e2a22220$a7e66660$@belski.net> Date: Wed, 19 Oct 2016 15:15:01 +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: <08ce01d22a12$e2a22220$a7e66660$@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: [PHP-DEV] Re: Constants for better double edge case handling From: ajf@ajf.me (Andrea Faulds) Hi, Anatol Belski wrote: >> 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.) >> > Ah, so then it is fine, thanks for the education. Then it'd stay by DBL_DIG > and DBL_EPSILON. While DBL_MAX/ DBL_MIN could still be useful in some case > (fe one would want to explicitly know the values), in most case it'd be > covered by INF. It can't hurt to add them anyway, though. -- Andrea Faulds https://ajf.me/