Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66023 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39698 invoked from network); 20 Feb 2013 08:15:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2013 08:15:25 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 173.203.6.131 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 173.203.6.131 smtp131.ord.emailsrvr.com Linux 2.6 Received: from [173.203.6.131] ([173.203.6.131:43079] helo=smtp131.ord.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/F2-19387-91684215 for ; Wed, 20 Feb 2013 03:15:23 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp17.relay.ord1a.emailsrvr.com (SMTP Server) with ESMTP id 80F6B3800A2; Wed, 20 Feb 2013 03:15:19 -0500 (EST) X-Virus-Scanned: OK Received: by smtp17.relay.ord1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 2E145380092; Wed, 20 Feb 2013 03:15:19 -0500 (EST) Message-ID: <51248616.907@sugarcrm.com> Date: Wed, 20 Feb 2013 00:15:18 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Gustavo Lopes CC: PHP Internals References: <511666DE.8080809@fedoraproject.org> <51172819.4000806@sugarcrm.com> <51174790.8040805@fedoraproject.org> <511751C5.1020906@fedoraproject.org> <51175BDD.9040705@sugarcrm.com> <5117BA92.8080307@fedoraproject.org> <511890AC.7080506@fedoraproject.org> <51189847.5030506@sugarcrm.com> <5122DE69.3080901@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] double val to long val conversion issue From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! >> Also, I'm not sure I understand what 64-bit test is supposed to return >> and why - why negative number is converted to positive one? What exactly >> this change is supposed to improve? > > The least significant bytes are preserved. Take int(-2056257536) and > int(2943463994971652096): > > In[6]:= BitAnd[2^32 - 1, {-2056257536, 2943463994971652096}] > > Out[6]= {2238709760, 2238709760} I'm not sure I understand, what this syntax means and how it explains why we're doing these conversions? I.e. what requires this change and how it is beneficial? I understand that it preserves least significant bits, but why we should preserve them and discard sign, for example? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227