Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71016 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57047 invoked from network); 6 Jan 2014 14:13:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jan 2014 14:13:50 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.204 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.204 mail4.serversure.net Linux 2.6 Received: from [217.147.176.204] ([217.147.176.204:54669] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 23/05-20906-A1ABAC25 for ; Mon, 06 Jan 2014 09:13:48 -0500 Received: (qmail 9124 invoked by uid 89); 6 Jan 2014 14:13:43 -0000 Received: from unknown (HELO linux-dev4.lsces.org.uk) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 6 Jan 2014 14:13:43 -0000 Message-ID: <52CABAA2.8090805@lsces.co.uk> Date: Mon, 06 Jan 2014 14:16:02 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0 SeaMonkey/2.22 MIME-Version: 1.0 To: PHP internals References: <001801cf07e9$a07af1e0$e170d5a0$@tutteli.ch> <52C5B5E1.5050609@lerdorf.com> <003c01cf07ee$123e08e0$36ba1aa0$@tutteli.ch> <52C5BE84.1050904@ajf.me> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] NAN and INF cast to int From: lester@lsces.co.uk (Lester Caine) Julien Pauli wrote: > I'm +1 to make div by zero return INF. This begs the question 'how' ... If we are processing to integer values they produce an integer result and there is no provision for a 'number' INF. This is the exact sort of request that prompted my recent article on 'what is a number' ... The bottom line is that 'int' simply does not have any means of returning NAN or INF so why are you even discussing it? It is messages relating to an 'int' object that need handling? Divide when divisor is '0' is a state that needs handling by the code, what ever the type of number object. As Rasmus has indicated, how a platform handles these edge cases is the inconsistent bit that needs documenting, and this is another aspect I need to add to my notes ... -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk