Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93634 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87680 invoked from network); 30 May 2016 16:34:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 May 2016 16:34:14 -0000 Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.50 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.213.50 mail-vk0-f50.google.com Received: from [209.85.213.50] ([209.85.213.50:34259] helo=mail-vk0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 58/31-11098-58B6C475 for ; Mon, 30 May 2016 12:34:13 -0400 Received: by mail-vk0-f50.google.com with SMTP id c189so227853126vkb.1 for ; Mon, 30 May 2016 09:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=XWxwFoxqev/233A/+LHiXGvLuQLFEf2yPHnj3QbhWMk=; b=HdZ6zz7+xH3XMyazTMhVBrj36H0UOt/SEZHp4q0xaYCVbjleq3F0VGiUCChxQxhq5h 2Sf5llmyCCa/A2cC5/NR4Q1PnRdBLRr30IxAqeMvfqM4kiB4delU5KZfpUWPeShK5xBT se2e8WTXI3p4ynnDjNQFZVaiO8NE1QvPdcdd54JyW4RIYwNI1RMEUsngZ2ZvUSbpHmc4 LHewGK9Nt2qjD02PescnCqYnuGaNzhfp/Iv9G5ZLeSYM+mzPdm45BRMHHSjVMUT+hhmg VKGYkxA7A+j2/Bkj4cGuGYO1fHjOEbjy08a82RV6rfvSYUiqVVnFgHZXYKScOZA3jXOl IUAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=XWxwFoxqev/233A/+LHiXGvLuQLFEf2yPHnj3QbhWMk=; b=RclvwjBJCjzsE3xJAGpNeAvE5G7zBBZPeX2V2Vf2CSdZHaF2du7qnQcfL2JcNBKaA2 0QqpRLaoo/ReWlQMarB+ojNLM4244opRKM4Uhbal3TOH64t14exQUI4aBXbZDwKenJ+m pdc3+3SUaGG9XjGlDJIweV9wZJ/AgzRSV3GOIfhDxPfLF9NkvDhJHb0muMxHnFVpCSI5 aadLUNpeMtM22KoTP6ggfmZB4khZRY/Id5nn+3DLk8FYzX56kl+iCEULPtrRilqrN75Y fMwE5kEHouNF9yzk1BQ8txNqfZWFPO8ENkiWn0vgXhHWQ05ssO2ZwFdSLqp684hl4yP9 oZ/g== X-Gm-Message-State: ALyK8tISOBTMNUjnZuaZPybg/VKARkvfW+wDqX+1QayqZmHbioKcFr6c9XOnnc6M8zzBr1tIBglhAGywQ8cpmg== MIME-Version: 1.0 X-Received: by 10.31.155.149 with SMTP id d143mr15327210vke.96.1464626050213; Mon, 30 May 2016 09:34:10 -0700 (PDT) Sender: jakub.php@gmail.com Received: by 10.31.172.65 with HTTP; Mon, 30 May 2016 09:34:10 -0700 (PDT) In-Reply-To: References: Date: Mon, 30 May 2016 17:34:10 +0100 X-Google-Sender-Auth: yhDFAYbhVVUSPg6PO0pDMZQ11CM Message-ID: To: "internals@lists.php.net" Cc: Yasuo Ohgaki Content-Type: multipart/alternative; boundary=001a113fcd6c73b19d053411d372 Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] More precise float value From: bukka@php.net (Jakub Zelenka) --001a113fcd6c73b19d053411d372 Content-Type: text/plain; charset=UTF-8 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 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! > > Hi, After asking Yasuo, I'm putting forward this RFC to have more precise float to string decoding at least in PHP 7.1. I cleaned the RFC up a little bit and it's targeting just 7.1. It has been some time since this was announced so I will keep it open for a week or two and then plan to start vote. Cheers Jakub --001a113fcd6c73b19d053411d372--