From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 8d9251aa for ; Sat, 21 Dec 2019 21:06:36 +0000 (UTC) Received: (qmail 2565 invoked by alias); 21 Dec 2019 17:56:55 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45119 Received: (qmail 17559 invoked by uid 1010); 21 Dec 2019 17:56:55 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm1-f50.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25663. spamassassin: 3.4.2. Clear:RC:0(209.85.128.50):SA:0(-2.0/5.0):. Processed in 1.181472 secs); 21 Dec 2019 17:56:55 -0000 X-Envelope-From: stephane.chazelas@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.128.50 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=Puz8myDsz5MCXP0VFbJAEwR/xAG1VjLLOdUAc/dLIJg=; b=onBXEWC7LmEyPTgE7QjEQ1CRkhSXGZBYy+wtPQQPBuhdT4XzdFDVJVEQ0Hrc3G7rz+ eu9EceZp4g7CTjwDcF8/ja3kbP/NkHvZ9v8WUTXUvy7JK277inn+iqDwCef0Nr/eM4m9 UNgWyR4Dif3WfK8CMnbaXFpVdX6RE7CUFckV9O18ifK/Bc7/9KrsWb02HAprYs8TkEaH FW23sfDd1FFSLlXXiC1W3rySCH82j2flMugcL+xVNzXQTkarU3xxJG4MeAbzlx4ZTOWa uu7kAVY5iykmh4vAuUshudOQekY3AItXlmfJ1q6Zho57SIAMMiwyXPX6EndtxV1TZEEL 3AXg== X-Gm-Message-State: APjAAAXsoS6QQ7NgB/cZaVgs3rq+8FMU2e7ZFjUc7ez+6rfEqNza/PmW eZzWW0H6gj9OC6HdL19lGa4= X-Google-Smtp-Source: APXvYqwbH/Cv2Ot+5hzmcLAOfEnva+JzoL9YsHM1D+yu6f9FY/jgCIAzrna2QCF1/kFLYugzUjIpog== X-Received: by 2002:a7b:c775:: with SMTP id x21mr16185617wmk.59.1576950980496; Sat, 21 Dec 2019 09:56:20 -0800 (PST) Date: Sat, 21 Dec 2019 17:56:18 +0000 From: Stephane Chazelas To: Roman Perepelitsa Cc: Zsh hackers list Subject: Re: zsh converts a floating-point number to string with too much precision Message-ID: <20191221175618.oolvw72n26tir2wg@chaz.gmail.com> Mail-Followup-To: Roman Perepelitsa , Zsh hackers list References: <20191220013711.GA708801@zira.vinc17.org> <20191220165824.ufvjtx37xt7dp2dt@chaz.gmail.com> <20191221005005.GB767822@zira.vinc17.org> <20191221084736.bokldw7tzxw3thn3@chaz.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 2019-12-21 10:43:43 +0100, Roman Perepelitsa: [...] > There is no simple algorithm that achieves this. I recall reading long > papers a few years back that were describing various inventions in > this field. They were pretty scary. https://github.com/openjdk/jdk/blob/f4af0eadb6eaf9d9614431110ab7fc9c1588966d/src/java.base/share/classes/jdk/internal/math/FloatingDecimal.java#L424 is not exactly trivial. I enjoyed reading the comments even if I have not clue what the the code is doing. -- Stephane