Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103374 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 61296 invoked from network); 23 Oct 2018 16:30:52 -0000 Received: from unknown (HELO mail-wr1-f52.google.com) (209.85.221.52) by pb1.pair.com with SMTP; 23 Oct 2018 16:30:52 -0000 Received: by mail-wr1-f52.google.com with SMTP id d2-v6so1551731wro.7 for ; Tue, 23 Oct 2018 05:45:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:date:subject:message-id :cc:to; bh=l+5kBGePuU88i11g87RDDeCQMP2X9qGWEzpkixMKUo0=; b=Xrvx4w1FHIzD2qG0NZWsc79u3uxbh2SSzG/hXA7bvYWh98gIs9ZnVs+oLAK05vtI7p Cuz7+MKYyCMempo4izFhuPLeRNwgGx3Uz0zl+FiIPI6dnT9TT6gy+LTb7lMCM6kwds0p 43i1mp7PdOc8d35mfgyHESxsddXEKL7OPM9qwlCQ4suUEsCxTpfbXICvlcGiq22CIhQg 9+gVByqGRjRc8m8flmZO1O8+Wtdj/aQr+C0EnPgmLvCpXsBJQT6GPYeI/0huXD8oezEk zgSHRvJ1796ZJQiXAqonLO46zCkF2mj3WTpEWvR+iejUEgNAhD9n7Ja3btq3w0beHLNl YylQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version:date :subject:message-id:cc:to; bh=l+5kBGePuU88i11g87RDDeCQMP2X9qGWEzpkixMKUo0=; b=YQtv+zkDlZ3ItgrsbMNBMT8GB0pFWsM4PA0E3Wt/e2nNxoF/se9VVG1tZB7zBs94KS kDtUeEzDZb4Vkjrn1mP+fy6vlt7kj5acb0pzzmRG5jkOTr7P7KaE4iP2U4TcpablylPW gtXxOg+nLN8fV2tPaGPHyug15H092JeR7WKbCeCKP3hI1oAMY7o//GsUJEYlSWWnXymz HZOf2Lf4tR4iz1BlaEttLBm4H8rnVQnI2uPmuclKdssy84M15wegzTsFPIAwk7lxKTc+ svV+axlU0DK9Jzgx+KZ06b1JCRBe/6SrTUgALw3IpTOM3uzhJ4cRO7Za3ee3rSipVE6m PnUQ== X-Gm-Message-State: ABuFfojuxvRwXgp4bsVbMVa2CbBwbXDpghiJwcAGwWcaKcna8Gbusf18 6N9NebqgS5+hFqd2QoznHzs= X-Google-Smtp-Source: ACcGV637FLbOPV7oCoO5p7nOhh6eO+tpPp8vNuGurUgKKVpl8lgn0DrJXIzqnz3x5/+Y6lpcDe2nQQ== X-Received: by 2002:a5d:6902:: with SMTP id t2-v6mr49699222wru.323.1540298744702; Tue, 23 Oct 2018 05:45:44 -0700 (PDT) Received: from [192.168.0.35] (cus25-1-78-224-0-236.fbx.proxad.net. [78.224.0.236]) by smtp.gmail.com with ESMTPSA id m136-v6sm1886385wmb.4.2018.10.23.05.45.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Oct 2018 05:45:43 -0700 (PDT) Content-Type: multipart/alternative; boundary=Apple-Mail-56AB5A18-4993-46A0-9BD2-B18DDD9CF4E7 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) Date: Tue, 23 Oct 2018 14:45:41 +0200 Message-ID: <9BA56FEF-D2DE-4696-B765-04BE3D70C244@gmail.com> Cc: internals@lists.php.net To: Rudi Theunissen X-Mailer: iPhone Mail (15G77) Subject: Re: Extension: arbitrary precision decimal arithmetic in PHP 7 From: benjamin.morel@gmail.com (Benjamin Morel) --Apple-Mail-56AB5A18-4993-46A0-9BD2-B18DDD9CF4E7 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Just for the record, I've written a userland arbitrary precision arithmetic l= ibrary, that provides a BigDecimal class which should be pretty similar to w= hat you're aiming to do: https://github.com/brick/math This library uses the existing GMP or BCMath extensions when available, but a= lso works without them, using a (slower, but fully functional) pure PHP impl= ementation. A new PHP extension that would provide native arbitrary precision numbers wi= th 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 : >=20 > Hi everyone, >=20 > 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 AP= I > and implementation with internals first. >=20 > See: https://github.com/php-decimal/php-decimal >=20 > Any advice, commentary or objection is welcome. :) >=20 > Thank you, > Rudi Theunissen >=20 > --0000000000001ef4ff0576f68080-- >=20 --Apple-Mail-56AB5A18-4993-46A0-9BD2-B18DDD9CF4E7--