Re: [PHP-DEV] Change default serialize precision from 100 to 17

2011-02-09 Thread Pierre Joye
+1 for trunk (with all necessary documentation and upgrading changes). Huge -1 for 5.3, just in case :) On Tue, Feb 8, 2011 at 2:26 AM, Gustavo Lopes wrote: > Given this, I propose changing the default precision to 17 (while the > precision is slightly less than 16, a 17th digit is necessary be

Re: [PHP-DEV] Change default serialize precision from 100 to 17

2011-02-08 Thread Ben Schmidt
Yes, I think it's dangerous to change the default display precision lest we have a ton of applications that currently show 0.2 showing 0.20001. Exactly. And remember, PHP output is not necessarily just for web pages for humans to read. Other apps may rely on parsing this data, etc.,

Re: [PHP-DEV] Change default serialize precision from 100 to 17

2011-02-08 Thread Gustavo Lopes
On Tue, 08 Feb 2011 20:05:05 -, Nicolas Grekas wrote: ini_set('precision', 17); After some testings, here is what I get : Yes, I think it's dangerous to change the default display precision lest we have a ton of applications that currently show 0.2 showing 0.20001.

Re: [PHP-DEV] Change default serialize precision from 100 to 17

2011-02-08 Thread Stan Vass
ini_set('precision', 17); After some testings, here is what I get : The default precision of 14 (or 12) must have been chosen to address this overlong string representation of many simple floats ? While I agree with you that any data loss must be forbidden, couldn't this also break existing c

Re: [PHP-DEV] Change default serialize precision from 100 to 17

2011-02-08 Thread Nicolas Grekas
> ini_set('precision', 17); After some testings, here is what I get : The default precision of 14 (or 12) must have been chosen to address this overlong string representation of many simple floats ? While I agree with you that any data loss must be forbidden, couldn't this also break existing c

Re: [PHP-DEV] Change default serialize precision from 100 to 17

2011-02-08 Thread Stan Vass
The default serialize precision is currently [1] set at 100. A little code inspection shows precision, in this case, takes the usual meaning of number of significant digits. Given that the implicit precision of a (normal) IEEE 754 double precision number is slightly less than 16 digits [2], th

Re: [PHP-DEV] Change default serialize precision from 100 to 17

2011-02-08 Thread Ilia Alshanetsky
+1 On Mon, Feb 7, 2011 at 8:26 PM, Gustavo Lopes wrote: > The default serialize precision is currently [1] set at 100. A little code > inspection shows precision, in this case, takes the usual meaning of number > of significant digits. > > Given that the implicit precision of a (normal) IEEE 754

[PHP-DEV] Change default serialize precision from 100 to 17

2011-02-07 Thread Gustavo Lopes
The default serialize precision is currently [1] set at 100. A little code inspection shows precision, in this case, takes the usual meaning of number of significant digits. Given that the implicit precision of a (normal) IEEE 754 double precision number is slightly less than 16 digits [2],