Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51436 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42306 invoked from network); 8 Feb 2011 20:05:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Feb 2011 20:05:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=nicolas.grekas@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nicolas.grekas@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: nicolas.grekas@gmail.com X-Host-Fingerprint: 74.125.82.170 mail-wy0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:50700] helo=mail-wy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/F3-18268-802A15D4 for ; Tue, 08 Feb 2011 15:05:29 -0500 Received: by wyb39 with SMTP id 39so6139136wyb.29 for ; Tue, 08 Feb 2011 12:05:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:content-type; bh=K5FBLg4DaZ+JTsvM5z6zGWbvHKsjV6gjUAaCnVuyBmc=; b=Qtecn6r1EDvzzACSgiyMhbs2l2qKyVne95vcT0D1a8XWu9ZT1aR/PyBCzCwMLXWskh YGS6UfyJF57nnqJfxyxPoXHRXX0m4/YoEc2hSl4ZqyB2l/O7Y5/0cuAsJhE1FzVxjm4f qIyJKOszeE+46ZdUc4KkoB15cMl7j15PDzBMU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=HxyhsLlZpn+7S3zFVK6k39kx8qC0z/oC/jihIrCBrdAfTc0Kpv9Kpy8uu7cJt40AVc EEADVjKBEexoYboW2bGA8pr6asTFORBlyZghOoUZaLDHCN9DmXO5bvIyaKV2UIO4u+/s Tr7+ITfjpkKfXM1BxgJZnW4VMYbpkb0xpxiOw= Received: by 10.216.121.3 with SMTP id q3mr15354520weh.72.1297195526095; Tue, 08 Feb 2011 12:05:26 -0800 (PST) MIME-Version: 1.0 Sender: nicolas.grekas@gmail.com Received: by 10.216.8.73 with HTTP; Tue, 8 Feb 2011 12:05:05 -0800 (PST) In-Reply-To: <843E1DDB7AB24D9FA8F05801FE45202A@pc> References: <843E1DDB7AB24D9FA8F05801FE45202A@pc> Date: Tue, 8 Feb 2011 21:05:05 +0100 X-Google-Sender-Auth: T3oBDYabNqiVIf-GZAs8It8lxAw Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Change default serialize precision from 100 to 17 From: nicolas.grekas+php@gmail.com (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 code ? Would it be possible to "displays a value based on the shortest decimal fraction that rounds correctly back to the true binary value", like python 2.7 and 3.1 do ? (http://docs.python.org/tutorial/floatingpoint.html) Just my 2cts :) Nicolas