Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76721 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75838 invoked from network); 20 Aug 2014 09:20:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Aug 2014 09:20:30 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.207 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.207 imap2-2.ox.privateemail.com Received: from [192.64.116.207] ([192.64.116.207:42589] helo=imap2-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/31-03084-C5864F35 for ; Wed, 20 Aug 2014 05:20:29 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 3167E8C007B; Wed, 20 Aug 2014 05:20:25 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap2.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap2.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Cce3kgz7r-dH; Wed, 20 Aug 2014 05:20:24 -0400 (EDT) Received: from [192.168.0.2] (05439dda.skybroadband.com [5.67.157.218]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 494008C0075; Wed, 20 Aug 2014 05:20:22 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: Date: Wed, 20 Aug 2014 10:20:20 +0100 Cc: Sara Golemon , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <4FAA8D1B-DFD5-4013-8407-F9E16AEAD5E2@ajf.me> References: <88F3B0AF-786C-43BA-AD39-3D8B77D13B2F@ajf.me> To: Dmitry Stogov X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] [RFC] Integer Semantics From: ajf@ajf.me (Andrea Faulds) On 20 Aug 2014, at 06:52, Dmitry Stogov wrote: > 1) INF conversion to zero seems wrong. May be +INF should be converted = to MAX_LONG and -INF to MIN_LONG? I think of Infinity as more of an error value than an actual number. Not = using MAX_LONG and MIN_LONG means it casts to the same value matter how = large the integer type is, and it happens to be what JavaScript casts = Infinity to. There=92s also the fringe benefit that 1/0=92s result in = PHP, FALSE, casts to zero, as Infinity now would also, which is the = standard IEEE 754 result for 1/0. > 3) a bit unrelated, but it also may make sense to introduce a logical = right shift operator (>>> in Java) How would that function? -- Andrea Faulds http://ajf.me/