Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3229614ybx; Sun, 3 Nov 2019 13:58:05 -0800 (PST) X-Google-Smtp-Source: APXvYqzl6Ep5pcviMEVqdrHD82qXOanf/itgnu3u0x8ZkWyqXPtzsYj+Azk8htviBeDABwSy+lNV X-Received: by 2002:a50:c191:: with SMTP id m17mr15239929edf.259.1572818285510; Sun, 03 Nov 2019 13:58:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572818285; cv=none; d=google.com; s=arc-20160816; b=w5rQ3RAOs4tdMHoR5xk95+DKAuLakF2LJSdVGBacSsv/DsUH1muxDM31drZKXfmEM6 tRVnCt07q463t7xSoHLIoVrjDbPqLDVUWv/QubIfCIx0/r+6q8SWLUGNA+0lGEOdC2rw +vFJXUwi4OCWXVTJfpl79EqeGOa2pDXg7cOcwAh++OSXLfqXmY7W6lEzseaZFYXsjFsw KulmpOUPZxbPO4whMv+mYubGZRFnY7Iw5h1RDhJSIlSF7CqmO+eLtbLgmqUOgP1dmj60 mWmgV2fDbxYedXYQQUa4Qp/53VZlgsXwdahBphDHqwxJvcXoRgWFlKwgyZWOLLkO/yql XovA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=DNkf4uxqo0YQIdE8Us9jbPgA9TmH/+Jl2gT1g76SXFs=; b=uWXqCij0hrXyKM9ykzG5UYn6qLoSzBwWBRYXrl3NtAk1mdWvU1MS4ybh596qy25Mu8 Ypbn0bDi3NMtqiVGdjbZxpMtEv9x4EAUR5VwN5opI/oV6PSZ2h47NnrSkxL8iJyiJn8y IMff1KlfnbDO3+pPdN52SM+KAuaMHA0hPKSwLCPpbrbf7OE3xqR89oNs9Fdxrnr690E2 LQo/I4F2QMh+1X9FGlzM+TQYRySEBiJAZ8XpiBMPSohoqJWmOsY6KL6KannyMhhviiIE iGuUcp9xh+nic9Gtd5X40Z2IZanbQUckZZl54ykHxMJZlc4U+Zb2G+wNvZ/5XeGuZHhO b5ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mJVC1+hx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8si6419315edc.387.2019.11.03.13.57.41; Sun, 03 Nov 2019 13:58:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mJVC1+hx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728260AbfKCV5C (ORCPT + 99 others); Sun, 3 Nov 2019 16:57:02 -0500 Received: from mail-il1-f193.google.com ([209.85.166.193]:36511 "EHLO mail-il1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728089AbfKCV5C (ORCPT ); Sun, 3 Nov 2019 16:57:02 -0500 Received: by mail-il1-f193.google.com with SMTP id s75so13119584ilc.3; Sun, 03 Nov 2019 13:57:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=DNkf4uxqo0YQIdE8Us9jbPgA9TmH/+Jl2gT1g76SXFs=; b=mJVC1+hx9OfnC/aY+y/U84n6SkDy4TVyo1BCEKWzcDune0oiuQM0zlLDAIkI/BnOza 9XGq2pJZa0LG1LUwBU8ta16gM66VPLZAp2RT7e0X0tSMsw90DgYhLrpUktoHRLK1rMuo UWtGv+pftbJe8cItRQeG7zLZaXZg+GMbI6EXcp72tLTIaHy0zeClzp1DsgTLOJuyoVQz Lb553PjJ8M00rjujhWsQYn3Bp+4N60qMG2VFa+X7UnOeb/kUWAfQ5uDkZ9sJFMc8JfaD HmSIUNv/mc9XHllbBGlOo9IQBVsCgk/HcstSuRrkIpQmpbDDEfgrv5mXny3AQ7/0IMv8 w7mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=DNkf4uxqo0YQIdE8Us9jbPgA9TmH/+Jl2gT1g76SXFs=; b=F7yJGkAx/A5X8/QcL21S2fLUNZdN0vR1wcOHTWMqbQ+vjk0EJL6/EaiOy1YZjWaVPs EcdThE0PNEBg5ISMtwkgU+o4y5v54HDRaTF8CVsxI4tIomR8mAGdseRndtQEy/kED9yg duIO4riy9vPFwo1ZsYotT07BqiQiDa2OKeRpcsm5OeuMcbbVDFlwdZl3w2OtlCh1pn3A 7pHtJwBzdJOp/UmMrFj0Z7365WhgsBkjEKTObIzy/sf88YCWx6BBLpXXRuYwoe5+WlqA 4vN+rlYG/NlBA3djTf9fMZXw3ryaGW3UgsEob4KG8hWBIgZ5d6r0Gd7W3G2I4xM1rSN1 JbpA== X-Gm-Message-State: APjAAAW3xvPhm5Qf8FaO/uEH0HFEn6cxK5YC4djVpMiuJDxdi0GBx1SY fEipuxTSon9f4BAG6Sg9blI2viiTDcAx79yUD7A= X-Received: by 2002:a92:d7c6:: with SMTP id g6mr22955596ilq.298.1572818221558; Sun, 03 Nov 2019 13:57:01 -0800 (PST) MIME-Version: 1.0 References: <20190620062246.2665-1-e5ten.arch@gmail.com> <20191029210250.17007-1-e5ten.arch@gmail.com> In-Reply-To: From: Ethan Sommer Date: Sun, 3 Nov 2019 16:56:50 -0500 Message-ID: Subject: Re: [PATCH v3] replace timeconst bc script with an sh script To: "H . Peter Anvin" Cc: Jonathan Corbet , Federico Vaga , "Chang S. Bae" , Andrew Morton , Arnd Bergmann , Masahiro Yamada , Kieran Bingham , Ingo Molnar , Borislav Petkov , Mark Rutland , John Stultz , Kees Cook , Corey Minyard , Thomas Gleixner , linux-doc@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Please let me point out, again, that bc *is* part of the basic POSIX tool= set, and the only tool in that toolset that allows for arbitrary-precision = arithmetic. That being said, GNU as, which we also depends on, also contain= s bigint arithmetic, so it might be possible to coax as into outputting ASC= II output without manually implementing bigints manually. > > Another option would be to use a C program linked with gmp. Binutils requ= ires gmp, so it doesn't inherently add dependencies, but running it though = as would probably be easier at least for the LLVM guys. > > I also have written a small, portable C bigint library, but that is a lot= of code to add to the tree. I don't know what the requirement is for the level of precision this would need to support is, so I don't know if this meets them, but I made a C program that doesn't use gmp, so while it probably doesn't theoretically have the same level of precision as bc, it does match it for output on anything up to 15000 (it doesn't stop matching timeconst.bc above 15000 I just didn't test any higher). The program is here: http://ix.io/20Ka If this is considered precise enough to be an acceptable replacement I will make a new patch to use it in place of timeconst.bc.