Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88489 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79530 invoked from network); 24 Sep 2015 22:50:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Sep 2015 22:50:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.181 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.214.181 mail-ob0-f181.google.com Received: from [209.85.214.181] ([209.85.214.181:32984] helo=mail-ob0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/33-58589-04E74065 for ; Thu, 24 Sep 2015 18:50:40 -0400 Received: by obbbh8 with SMTP id bh8so69842107obb.0 for ; Thu, 24 Sep 2015 15:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=BoZM/tN7NGiyy6j66LwqGEFgj/Xg/Ibc3asVCyvNGLE=; b=Ya2WsNA9sRQ/cBPGlzvg7oB9jAMJfgaLSKTALGdl8cgS9m9tDbG1Ql3HB4mZecWuv9 AwkX9CnWUL7zLYbVzexFxadpfcj2rLfNMFAK0oHFdkMhjqh4qwDFjLCYy8XtoYyul2x9 QQwm9mKRZZndY4KdPy+9qs9O3xv/sAy8aU2YtzzKPd1uH3cmBX7TFczkuqU/x4wHWt1w dzzgPjvvMWXaTIADpyEUSbNXwCZeSICDq1S7uCUZHLnelzF8VAA2jWxvnl/UIxfAQgNS fnagAVBMIBAzO++2GdIJM4MNke4q6GRPBgtVxmWSWWTowE8TdHkFUJVE6+YcKMj+9ybq yBkA== X-Received: by 10.182.115.230 with SMTP id jr6mr1408663obb.72.1443135037839; Thu, 24 Sep 2015 15:50:37 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.202.226.15 with HTTP; Thu, 24 Sep 2015 15:49:58 -0700 (PDT) In-Reply-To: <023701d0f4a4$a0da4f60$e28eee20$@belski.net> References: <023701d0f4a4$a0da4f60$e28eee20$@belski.net> Date: Fri, 25 Sep 2015 07:49:58 +0900 X-Google-Sender-Auth: jbM4UtvX9FnKeZiOSBZvq20uktc Message-ID: To: Anatol Belski Cc: Kalle Sommer Nielsen , Ferenc Kovacs , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: [RFC] [DISCUSSION] More precise float value From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Anatol, On Tue, Sep 22, 2015 at 4:35 AM, Anatol Belski wrot= e: >> -----Original Message----- >> From: yohgaki@gmail.com [mailto:yohgaki@gmail.com] On Behalf Of Yasuo >> Ohgaki >> Sent: Sunday, September 20, 2015 11:49 PM >> To: Kalle Sommer Nielsen >> Cc: Anatoliy Belsky ; Ferenc Kovacs ; >> internals@lists.php.net >> Subject: Re: [PHP-DEV] Re: [RFC] [DISCUSSION] More precise float value >> >> Hi Anatol and Ferenc, >> >> On Sat, Sep 19, 2015 at 7:15 AM, Kalle Sommer Nielsen wr= ote: >> > I'm sorry I have not caught this any earlier, but even without >> > consulting with Anatol, I'm not keen on adding this into 7.0, we are >> > in RC stage, and I want us to focus on a stable release instead of >> > adding more potential issues, I suggest you target 7.1 instead in the >> > RFC. >> > >> > (Ferenc and Anatol cc'd) >> >> I was expecting this kind of reply for this RFC. >> What do you think? >> >> This RFC contains JSON float value precision change for PHP 5.6 so that = PHP >> would not loose floating number information, as well as more precise flo= at >> handling option for PHP 7.0. >> >> FYI, var_dump()'s float precision was changed to use serialize_precision= as bug >> fix before. >> > Thanks for the ping. IMHO this is the stuff for 7.1. I actually saw the d= iscussions previously, but was rather thinking you was targeting 7.1 as tha= t was already the time of the feature freeze. No problem. I'll update so that 0 mode is for 7.1. JSON's is better to use larger precision. So this change is targeted to 5.6 and 7.0. Let me know if you have comments on this. > > Please keep in mind that we effectively have two RCs to do the remaining = stabilizations. And we probably should as much as possible. Because this pa= tch it's rather an enhancement to the current functionality which is not in= deed broken - I wouldn't see it as critical for 7.0. It should be voted (an= d discussed if necessary) for 7.1, so we don't loop away from our current s= ituation. > > BTW I also had a comment there in the PR about https://github.com/php/php= -src/pull/1455/files#diff-c84859666ff690a113d55ef1899d8bf4R149 - so if mode= 0 ignores ndigits, why set it to 17 (or anything else). Seems like an unne= cessary action, but snprintf is used quite frequently. But just as a notice= on the side. "-1" which is invalid precision is used to indicate 0 mode. 0 mode is supposed to use max precision for double (it seems many implementations use 16, but PHP uses 17), when 0 mode is used, it uses 17 as precision alwa= ys. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net