Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88525 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36277 invoked from network); 28 Sep 2015 08:29:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Sep 2015 08:29:11 -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.218.46 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.218.46 mail-oi0-f46.google.com Received: from [209.85.218.46] ([209.85.218.46:35618] helo=mail-oi0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/A0-23115-55AF8065 for ; Mon, 28 Sep 2015 04:29:09 -0400 Received: by oiww128 with SMTP id w128so86366373oiw.2 for ; Mon, 28 Sep 2015 01:29:07 -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=gHkST6CiGTA9AAh351Cy1PI6q3ZElFBSLWTokJ9Desg=; b=IhvcncQMIPU7gJVpR2bgSP5tetwYz8ty876QxRjZy5qne/b2FgFQAO/odxHby+Sf5e Eu3S4MubxQpQL8bDXtlKY9dI7mQqf44NJlZ4eb+Hn0/449A09NYkZKCK345iEHNW/5HF 7Xsj2V0Qb26sF9uYVAzd8HHhS5UQmKVCbw4y4z2WBmtYU16gm//3GapgWnBBWMU9qCaV vP5JjZBqH3b/kjeswkAIhq7fNR7jyjNvc/F1IChY984TCVU32Na15CeDnMXyW393i/Kx X/9dTW9VBWY+PwEr9uE01QZLecjoT9yeDmpuHY8DBF0CyRbDNUsjsAkE8EPQq3E6G12j 26bw== X-Received: by 10.202.0.206 with SMTP id 197mr9728847oia.76.1443428947050; Mon, 28 Sep 2015 01:29:07 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.202.188.84 with HTTP; Mon, 28 Sep 2015 01:28:27 -0700 (PDT) In-Reply-To: <009101d0f95d$e7492670$b5db7350$@belski.net> References: <023701d0f4a4$a0da4f60$e28eee20$@belski.net> <004701d0f892$05fdb0d0$11f91270$@belski.net> <009101d0f95d$e7492670$b5db7350$@belski.net> Date: Mon, 28 Sep 2015 17:28:27 +0900 X-Google-Sender-Auth: _Ws3365C8oEBit-9rNDmysFTloc Message-ID: To: Ferenc Kovacs Cc: Jakub Zelenka , Kalle Sommer Nielsen , PHP internals list , Anatol Belski 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 all and Ferenc, On Mon, Sep 28, 2015 at 4:51 AM, Anatol Belski wrot= e: >> -----Original Message----- >> From: jakub.php@gmail.com [mailto:jakub.php@gmail.com] On Behalf Of Jaku= b >> Zelenka >> > Exactly, so my question was - why it still needs to do "if (mode =3D= =3D 0) >> > ndigit =3D 17;" in snprintf at the place I've linked? It won't have an= y >> > effect as zend_dtoa will ignore it :) >> > >> >> As I said in the PR some time ago, it's not used by dtoa for mode 0 but = it's still >> used by php_gcvt for checking if exponential or decimal notation should = be >> used. See >> >> https://github.com/php/php- >> src/blob/250938e2d35fc54161a18167b7901c5e3b574371/main/snprintf.c#L163 >> > Ah, I see it now. The patch is quite sparse, so have to check the whole f= unctions. Thanks for the explanations. > > For 7.0 raising the precision INIs to max supported were probably OK, but= no new INI options should be added. And IMHO, there should be only one INI= option change, and preferably full patch with json_precision in 7.1 and no= t touching other branches (the simplest solution). As it seems, one sees it= critical to start using 17 digits in 7.0 - then probably vote were eligibl= e (whereby I wouldn't see it critical). But then IMHO - switch to serialize= _precision in 7.0 and keep the name for 7.1 with full patch. Though please = be aware that times are going fast, if you decide to put something 7.0 rela= ted to the vote, be sure the results stand till RC5. Thank you for explanation, Jakub. Ferenc, are you OK with the JSON serialize precision change? i.e. Use PG(serialize_precision) rather than EG(precision) when json_serialize() is called. If yes, I'll prepare the patch and start the vote immediately. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net