Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96489 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70512 invoked from network); 19 Oct 2016 14:13:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Oct 2016 14:13:03 -0000 Authentication-Results: pb1.pair.com header.from=anatol.php@belski.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=anatol.php@belski.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain belski.net from 85.214.73.107 cause and error) X-PHP-List-Original-Sender: anatol.php@belski.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:51818] helo=h1123647.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/2A-14749-B6F77085 for ; Wed, 19 Oct 2016 10:13:02 -0400 Received: by h1123647.serverkompetenz.net (Postfix, from userid 1006) id C69C2784A29; Wed, 19 Oct 2016 16:12:56 +0200 (CEST) Received: from w530phpdev (p54A77E47.dip0.t-ipconnect.de [84.167.126.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by h1123647.serverkompetenz.net (Postfix) with ESMTPSA id 9BA0B78498D; Wed, 19 Oct 2016 16:12:54 +0200 (CEST) To: "'Andrea Faulds'" , References: <073601d2296f$f27135e0$d753a1a0$@belski.net> <09.75.14749.5BB67085@pb1.pair.com> In-Reply-To: <09.75.14749.5BB67085@pb1.pair.com> Date: Wed, 19 Oct 2016 16:12:50 +0200 Message-ID: <08ce01d22a12$e2a22220$a7e66660$@belski.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQLlDuGb9gOgPljy9Dd28b2S9fYVaADg9k70noL8WIA= Content-Language: en-us Subject: RE: [PHP-DEV] Re: Constants for better double edge case handling From: anatol.php@belski.net ("Anatol Belski") Hi Andrea, > -----Original Message----- > From: Andrea Faulds [mailto:ajf@ajf.me] > Sent: Wednesday, October 19, 2016 2:49 PM > To: internals@lists.php.net > Subject: [PHP-DEV] Re: Constants for better double edge case handling > > 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.) > 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. Regards Anatol