Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103404 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 73087 invoked from network); 27 Oct 2018 06:18:44 -0000 Received: from unknown (HELO mail-vs1-f45.google.com) (209.85.217.45) by pb1.pair.com with SMTP; 27 Oct 2018 06:18:44 -0000 Received: by mail-vs1-f45.google.com with SMTP id 124so2001548vsp.12 for ; Fri, 26 Oct 2018 19:34:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uETiBF3Ll5YsXAU3t0oG0MJEfnn3/Srp7DJSA1QxS8k=; b=GvTW2iyO3rG+9jDFHOcajFy3kdmhm9kzkjfG8sdwIsjOYD00ohckt5tOImDW2vMnpI 0BM7j2X91OQE4YTTgsOZ5R0yvDpuBquDDBupzj3sbKjFdTt6VADENd3ht62LegZDlJ/s lCiUoGJGKC9YmRJbcPd0eO9MlPCzfucRRcol5Vu4XCukof8/IaitKO/Xo+8IwHGzNNgU hRdmfkE4OhlgWCp1oIWZfLbsrhAJiVuebWnCe+OH+FczkYcG68wQdndKebv1FNsZkus4 41Zhd4oDPlcaZjqW1a0fzoTf2aG2AFaL6UjRZSF2MlvW48D2skObgkB6+t3eVqsRVFC+ 68ag== X-Gm-Message-State: AGRZ1gIXZDwFW63/FhUXgFK1nAis5vTNkBjleZ5Xe+rKujcQEzVYDcwS SAeGxUEWdrumP9tR05rD8TJN7GCI X-Google-Smtp-Source: AJdET5cypoVxMyDaJawEdSVQLQoaedaBIL/rTjiAjlxHKF7rYQxGWTGWjag77DRjE/Cr4NO1uTmjaw== X-Received: by 2002:a67:ac0d:: with SMTP id v13mr2418113vse.196.1540607670258; Fri, 26 Oct 2018 19:34:30 -0700 (PDT) Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com. [209.85.217.54]) by smtp.gmail.com with ESMTPSA id t83sm3677853vkt.54.2018.10.26.19.34.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Oct 2018 19:34:29 -0700 (PDT) Received: by mail-vs1-f54.google.com with SMTP id a202so2017684vsd.5 for ; Fri, 26 Oct 2018 19:34:29 -0700 (PDT) X-Received: by 2002:a67:de9a:: with SMTP id r26mr2613091vsk.127.1540607669096; Fri, 26 Oct 2018 19:34:29 -0700 (PDT) MIME-Version: 1.0 References: <9BA56FEF-D2DE-4696-B765-04BE3D70C244@gmail.com> In-Reply-To: <9BA56FEF-D2DE-4696-B765-04BE3D70C244@gmail.com> Date: Fri, 26 Oct 2018 19:34:09 -0700 X-Gmail-Original-Message-ID: Message-ID: To: benjamin.morel@gmail.com Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000dad9b905792cac24" Subject: Re: Extension: arbitrary precision decimal arithmetic in PHP 7 From: rtheunissen@php.net (Rudi Theunissen) --000000000000dad9b905792cac24 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Benjamin, Brick\Math looks awesome. I really like the static initializers and descriptive method names. I recognize some of the patterns from OpenJDK's BigDecimal source. :) The major difference to me is scale vs precision, ie. number of significant digits vs number of digits behind the decimal point. Not sure which is better, just noticing the difference. Your production is so good, by the way. I really appreciate it. Rudi On Tue, Oct 23, 2018 at 5:45 AM Benjamin Morel wrote: > Just for the record, I've written a userland arbitrary precision > arithmetic library, that provides a BigDecimal class which should be pret= ty > similar to what you're aiming to do: > > https://github.com/brick/math > > > This library uses the existing GMP or BCMath extensions when available, > but also works without them, using a (slower, but fully functional) pure > PHP implementation. > > > A new PHP extension that would provide native arbitrary precision numbers > with an OO API would be welcome, IMO. > > Maybe brick/math can help inspire your API? > > > Benjamin > > Le 29 sept. 2018 =C3=A0 01:05, Rudi Theunissen a = =C3=A9crit : > > Hi everyone, > > I've been working on adding arbitrary precision decimal support as an > alternative to *bcmath. *I have created an extension based on *mpdecimal*= , > which is what Python 3's decimal module is also based on. I haven't > released or broadcast this project yet, because I wanted to discuss the A= PI > and implementation with internals first. > > See: https://github.com/php-decimal/php-decimal > > Any advice, commentary or objection is welcome. :) > > Thank you, > Rudi Theunissen > > --0000000000001ef4ff0576f68080-- > > --000000000000dad9b905792cac24--