Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73769 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73183 invoked from network); 23 Apr 2014 22:43:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Apr 2014 22:43:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=park.framework@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=park.framework@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.67 as permitted sender) X-PHP-List-Original-Sender: park.framework@gmail.com X-Host-Fingerprint: 74.125.83.67 mail-ee0-f67.google.com Received: from [74.125.83.67] ([74.125.83.67:35422] helo=mail-ee0-f67.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A3/D0-01676-91248535 for ; Wed, 23 Apr 2014 18:43:38 -0400 Received: by mail-ee0-f67.google.com with SMTP id t10so793605eei.6 for ; Wed, 23 Apr 2014 15:43:34 -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=ffNLOBD9LC4PLuyHGf+y+NF3r0ZEXBnrfN1mIuxiuJI=; b=IlFKDJpbhBRgs8+OPLQnEKvVNl3wpWv9OFsZhWu69OfFq3lPIwwruhmBf6G/mzHDo8 tmBuoghKYgOwSkh1EH3Pqk1wKvaj+mVW6sknxiPydEkN8X5VACDIeL+yXRZG6vJU6Jn2 kRhSESnag2cpbN00XHOhXXvi6s7J0BbIPyONvXzRS2hXw3a7C2isTaZs4XrOgmmtkIbk TZo8VHX/abqIFYVO2dwd/0Eax6yjkqGmggHVIDfqlpj3/sNKxTYCrvtatyKPBIgzTJbh LUH1UsvAoLhrxaljeUidmgbPrATmUO9l6cV+qR2Pp6Q69fqgxjmUcMsfUDlNVICe3Axp u7iA== MIME-Version: 1.0 X-Received: by 10.14.246.1 with SMTP id p1mr65516940eer.20.1398293013020; Wed, 23 Apr 2014 15:43:33 -0700 (PDT) Received: by 10.14.107.199 with HTTP; Wed, 23 Apr 2014 15:43:32 -0700 (PDT) In-Reply-To: <1398114461.2829.3268.camel@guybrush> References: <1398114461.2829.3268.camel@guybrush> Date: Thu, 24 Apr 2014 01:43:32 +0300 Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=001a1132f65855452604f7bd7660 Subject: Re: [PHP-DEV] [RFC] Floating Point support in GMP extension From: park.framework@gmail.com (Park Framework) --001a1132f65855452604f7bd7660 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ok, add precision param to gmp_init. gmp_init ( mixed $number [, int $base =3D 0 ], int $precision =3D 0]] ) $a =3D gmp_init (3); // type float, by precision =3D 0 $b =3D gmp_init (3.333, 10, 3); // float $c =3D $a + $b; // float 2014-04-22 0:07 GMT+03:00 Johannes Schl=C3=BCter : > On Mon, 2014-04-21 at 23:40 +0300, Park Framework wrote: > > For backward compatibility in php.ini set default values > > =E2=80=8B=E2=80=8Bgmp.default_precision =3D 0 > > No. INI setting is *not* backwards compatibility. An ini setting means > that *everybody* has to care about it and mind it and either check or > set it. > > An alternative is a runtime setting (gmp_set_compatiility(true) ), in > case the change is really important. I haven't looked further but > behavior should not depend on ini. We made the mistake and should learn > not repeat. > > johannes > > --001a1132f65855452604f7bd7660--