Re: Re: [RFC] [DISCUSSION] More precise float value

From: Date: Fri, 18 Sep 2015 22:05:25 +0000
Subject: Re: Re: [RFC] [DISCUSSION] More precise float value
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-88363@lists.php.net to get a copy of this message
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 <yohgaki@ohgaki.net> 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

« previous php.internals (#88363) next »