Re: cvs: php4(PHP_4_3) / php.ini-dist php.ini-recommended /ext/standard var.c /ext/standard/tests/serialize bug23298.phpt /main main.c
php_globals.h
| From: | Sascha Schumann | Date: | Thu, 08 May 2003 11:21:48 +0000 |
| Subject: | Re: cvs: php4(PHP_4_3) / php.ini-dist php.ini-recommended /ext/standard var.c /ext/standard/tests/serialize bug23298.phpt /main main.c php_globals.h |
||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-20786@lists.php.net to get a copy of this message | ||
Good to see these changes.
> +; When floats & doubles are serialized store serialize_precision significant
> +; digits after the floating point. The default value ensures that when floats
> +; are decoded with unserialize, the data will remain the same.
Nevertheless, this is a wrong assumption as I already told
you in private email.
You lose bits of information during every single fp<->base 10
conversion, regardless of how many digits are stored.
Applications which assume that a serialized float can be
unserialized without loss of precision are flawed. It's as
simple as that.
The default precision should be at most 20 -- that's nearer
to the old default precision (12) and still inhibits the
information loss quite a bit.
- Sascha