Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88363 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29542 invoked from network); 18 Sep 2015 22:05:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Sep 2015 22:05:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 68.114.190.28 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 68.114.190.28 mtaout003-public.msg.strl.va.charter.net Received: from [68.114.190.28] ([68.114.190.28:47473] helo=mtaout003.msg.strl.va.charter.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/B3-09127-7AA8CF55 for ; Fri, 18 Sep 2015 18:05:29 -0400 Received: from impout004 ([68.114.189.19]) by mtaout003.msg.strl.va.charter.net (InterMail vM.9.00.020.01 201-2473-160) with ESMTP id <20150918220525.YIDJ6048.mtaout003.msg.strl.va.charter.net@impout004>; Fri, 18 Sep 2015 17:05:25 -0500 Received: from pc1 ([96.35.251.86]) by impout004 with charter.net id Jm5Q1r00N1sc0so01m5QT7; Fri, 18 Sep 2015 17:05:25 -0500 X-Authority-Analysis: v=2.1 cv=OIGp3EqB c=1 sm=1 tr=0 a=Is5gsZaFXO8aPum+t7Tz+g==:117 a=Is5gsZaFXO8aPum+t7Tz+g==:17 a=hOpmn2quAAAA:8 a=BCPeO_TGAAAA:8 a=N659UExz7-8A:10 a=g2Kqcd2lAAAA:8 a=67BIL_jfAAAA:8 a=NEAV23lmAAAA:8 a=ulsN7I7eEN_mKBnaGyQA:9 a=pILNOxqGKmIA:10 Message-ID: <45C7176E923D430F897C2F2989421343@pc1> To: , "Yasuo Ohgaki" References: Date: Fri, 18 Sep 2015 17:05:25 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Subject: Re: [PHP-DEV] Re: [RFC] [DISCUSSION] More precise float value From: php_lists@realplain.com ("Matt Wilmas") Hi Yasuo, ----- Original Message ----- From: "Yasuo Ohgaki" Sent: Friday, September 18, 2015 > Hi all, > > On Fri, Sep 4, 2015 at 9:41 AM, Yasuo Ohgaki wrote: >> IEEE 754 double cannot express exact float values. That said, >> float values expressed by json/serialize/var_export/echo/print >> are not precise enough in many cases. >> >> Issues: >> - json_encode() uses EG(precision)=14 that truncates float values. >> echo()/print() >> does this as well. >> - large EG(precision)/PG(serialize_precision) prints meaningless values. >> >> This RFC proposes zend_dtoa()'s 0 mode support which rounds float value >> to nearest value. >> >> https://wiki.php.net/rfc/precise_float_value >> https://github.com/php/php-src/pull/1455 >> >> This change is simple enough for PHP 7.0. IMO. >> Comments/suggestions are appreciated! > > It's been 2 weeks and no comment for this. > I'll start voting. Cool, but there's no voting available...? :-) > Thanks. > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net - Matt