Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88523 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7612 invoked from network); 27 Sep 2015 19:51:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Sep 2015 19:51:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=anatol.php@belski.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=anatol.php@belski.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain belski.net from 85.214.73.107 cause and error) X-PHP-List-Original-Sender: anatol.php@belski.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:41833] helo=h1123647.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/5A-06395-8C848065 for ; Sun, 27 Sep 2015 15:51:37 -0400 Received: by h1123647.serverkompetenz.net (Postfix, from userid 1006) id 066AD6D2002; Sun, 27 Sep 2015 21:51:33 +0200 (CEST) Received: from w530phpdev (pD9FE888B.dip0.t-ipconnect.de [217.254.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by h1123647.serverkompetenz.net (Postfix) with ESMTPSA id 535C86D2002; Sun, 27 Sep 2015 21:51:30 +0200 (CEST) To: "'Jakub Zelenka'" Cc: "'Yasuo Ohgaki'" , "'Kalle Sommer Nielsen'" , "'Ferenc Kovacs'" , "'PHP internals list'" References: <023701d0f4a4$a0da4f60$e28eee20$@belski.net> <004701d0f892$05fdb0d0$11f91270$@belski.net> In-Reply-To: Date: Sun, 27 Sep 2015 21:51:26 +0200 Message-ID: <009101d0f95d$e7492670$b5db7350$@belski.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQIuTDCwWc2HF4xophrruCZqRmQ9xAK8kBvIAb/EVTQDP8PfqgOVioFOAsDUwzoDCR8GfAEfh9z6nQQ2QIA= Content-Language: en-us Subject: RE: [PHP-DEV] Re: [RFC] [DISCUSSION] More precise float value From: anatol.php@belski.net ("Anatol Belski") Hi Jakub, > -----Original Message----- > From: jakub.php@gmail.com [mailto:jakub.php@gmail.com] On Behalf Of = Jakub > 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 = any > > effect as zend_dtoa will ignore it :) > > >=20 > 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 >=20 > https://github.com/php/php- > src/blob/250938e2d35fc54161a18167b7901c5e3b574371/main/snprintf.c#L163 >=20 Ah, I see it now. The patch is quite sparse, so have to check the whole = functions. 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 not 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 eligible (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 related to the vote, be sure the = results stand till RC5.=20 Regards Anatol