Re: double val to long val conversion issue

From: Date: Wed, 20 Feb 2013 08:15:18 +0000
Subject: Re: double val to long val conversion issue
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Groups: php.internals 
Request: Send a blank email to internals+get-66023@lists.php.net to get a copy of this message
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

« previous php.internals (#66023) next »