Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75021 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42681 invoked from network); 20 Jun 2014 14:58:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jun 2014 14:58:34 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:49609] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/60-40391-91C44A35 for ; Fri, 20 Jun 2014 10:58:33 -0400 Received: by mail-ob0-f170.google.com with SMTP id uz6so1184635obc.15 for ; Fri, 20 Jun 2014 07:58:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2htVeAeoUYWMB8vGdtAXGjWrLsmMqnSA6ev+9c4F6RY=; b=X2/C2cOyn62CzhbCxKzqXU0/hT8Ctx/PIGXD3xtz+dWC1V4sGwtY3VMG9Y+HbD0ymp xDFJmXIP3rm4zQ7BPjAw8J8oPy4yAx4zx4cxR/yuc8nkYWEL492r4g7JRdnurJ/KWUgx cVRlWp6x6eJ6sFjgpd5Qk6C9AcvJ1p+GiY0ls7Cd3YRT3DNn+XOtJ1xBsgi1Pzi6Ufrf fHsCkBI8apHy7b+8uI4pGcb3tTk2yQH1RG7W7Z/QqWGOKbG6xb1IS5+3xNhpA6r3FVzd mxSlZlkDLgnTvzAhCa+6QJa/LIkhtzb34SilXgYQDiBonvepm7GyCoyHbVwJEFVUG/pM Wpeg== MIME-Version: 1.0 X-Received: by 10.182.80.168 with SMTP id s8mr3963088obx.45.1403276310417; Fri, 20 Jun 2014 07:58:30 -0700 (PDT) Received: by 10.182.165.69 with HTTP; Fri, 20 Jun 2014 07:58:30 -0700 (PDT) In-Reply-To: References: Date: Fri, 20 Jun 2014 16:58:30 +0200 Message-ID: To: Andrea Faulds Cc: PHP Internals Content-Type: multipart/alternative; boundary=047d7b2e480201169704fc45ba6c Subject: Re: [PHP-DEV] [DRAFT][RFC] Big Integer Support From: nikita.ppv@gmail.com (Nikita Popov) --047d7b2e480201169704fc45ba6c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, Jun 20, 2014 at 2:35 AM, Andrea Faulds wrote: > Good evening again, > > I=E2=80=99ve been working on a patch to add bigints to PHP for more than = a > fortnight now. It=E2=80=99d based on the phpng branch and very much unfin= ished, but > is somewhat working. > > A draft RFC is available here: https://wiki.php.net/rfc/bigint > > It=E2=80=99s quite far from done, but I wanted to start some discussion n= ow as > finishing the patch will take some time. > > Thanks! > Hey Andrea, this looks really interesting! Could you please submit a PR from your branch, so it's possible to review the code? Regarding the RFC text, I think you mixed up some left and right shifts. "<< 65 will result in zero" is probably supposed to be >> 65? And "right shifts will promote to bigints" probably is talking about left shifts? Btw, I wouldn't worry about the change in shifts larger than the integer width. Those have always been UB inherited from using UB of the C language. The cyclic behavior is only an idiosyncrasy of the x86 architecture - other ISAs like ARM (iirc) will not exhibit the behavior. Nikita --047d7b2e480201169704fc45ba6c--