Re: [PHP-DEV] [RFC] [DISCUSSION] More precise float value

2016-06-05 Thread Jakub Zelenka
On Mon, May 30, 2016 at 8:01 PM, Jakub Zelenka wrote: > On Mon, May 30, 2016 at 7:28 PM, Nikita Popov > wrote: > >> On Mon, May 30, 2016 at 6:34 PM, Jakub Zelenka wrote: >> >>> On Fri, Sep 4, 2015 at 1:41 AM, Yasuo Ohgaki wrote: >>> >>> > Hi all, >>> > >>> > IEEE 754 double cannot express exac

Re: [PHP-DEV] [RFC] [DISCUSSION] More precise float value

2016-05-30 Thread Jakub Zelenka
On Mon, May 30, 2016 at 7:46 PM, Fleshgrinder wrote: > On 5/30/2016 8:28 PM, Nikita Popov wrote: > > This proposal adds a new json.precision setting. Why? I've been told that > > this is more flexible, which is fair enough, but imho we should have very > > strong reasons for introducing new ini s

Re: [PHP-DEV] [RFC] [DISCUSSION] More precise float value

2016-05-30 Thread Jakub Zelenka
On Mon, May 30, 2016 at 7:28 PM, Nikita Popov wrote: > On Mon, May 30, 2016 at 6:34 PM, Jakub Zelenka wrote: > >> On Fri, Sep 4, 2015 at 1:41 AM, Yasuo Ohgaki wrote: >> >> > Hi all, >> > >> > IEEE 754 double cannot express exact float values. That said, >> > float values expressed by json/seria

Re: [PHP-DEV] [RFC] [DISCUSSION] More precise float value

2016-05-30 Thread Fleshgrinder
On 5/30/2016 8:28 PM, Nikita Popov wrote: > This proposal adds a new json.precision setting. Why? I've been told that > this is more flexible, which is fair enough, but imho we should have very > strong reasons for introducing new ini settings. Reasons that go beyond "it > might be useful to someon

Re: [PHP-DEV] [RFC] [DISCUSSION] More precise float value

2016-05-30 Thread Nikita Popov
On Mon, May 30, 2016 at 6:34 PM, Jakub Zelenka wrote: > On Fri, Sep 4, 2015 at 1:41 AM, Yasuo Ohgaki wrote: > > > Hi all, > > > > 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 ca

Re: [PHP-DEV] [RFC] [DISCUSSION] More precise float value

2016-05-30 Thread Jakub Zelenka
On Fri, Sep 4, 2015 at 1:41 AM, Yasuo Ohgaki wrote: > Hi all, > > 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 trunca

[PHP-DEV] [RFC] [DISCUSSION] More precise float value

2015-09-03 Thread Yasuo Ohgaki
Hi all, 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(p