Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3232966ybx; Sun, 3 Nov 2019 14:02:36 -0800 (PST) X-Google-Smtp-Source: APXvYqy6BkVGcnFA5GMtzN/9aldpnc3vSUtkeaK4Mgc5uB3+tAv0MlwZtAIuT+Xa2u1WiyE0ZmQM X-Received: by 2002:a50:8a88:: with SMTP id j8mr26619133edj.35.1572818556111; Sun, 03 Nov 2019 14:02:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572818556; cv=none; d=google.com; s=arc-20160816; b=vGvYQDNDlLgTZ4q5GNFURAWec/MGNw4tKz3LBafI/ggmKOrii4hhwY0OJzvsykIM+A zFF0TzeDqEw+jxOeJsDxP3d/vXzy5b5DY5zW5czXWY8E0DcUHKTUfBoQbgh31OWigJqi Xetwhqoi5SdwCJPUohC5Unr+Vq6DYsYkIOJI1W+zd0Zr752u2wN4fwJTZziM9+DIhRCz ukJ8l2cm+juY4D8wuWj/bN5qpDlE/9izdraCGE568kMys+HpJjc4MNVFQKZyRyvZefn3 FXHl6QvuORYRUiO4s58dIv7kG+9K9V1Zohz3bBs7k6PUZn5GaXZFNC0gpzf/04o9IBGG O36A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:dkim-signature:dkim-filter; bh=1dtJBXwpbDabMD1Gg7C4v+rSy3ncm7MJY6zt3M5CfrE=; b=F3P08WrPwIkX7SbIuisk4qNE6EGyXjZ1MCDgZfkhM6VNuV7EgIYwIg90riHZMyYXaq tC/Cpqng6DAjmZ1T1x06gbJK1q44PQWoRZ70Flf3N6NgdBq+gYLOQ01pdq11Teh9yZw3 Z1mi3oOSXJiCHRScnEnE8bBrVPCd/kirHZF13zK8lzIWaVLb0W9G1H3ThJK6OJIuszp6 2pzBgkrPblH96JOW8/cfuO9ZUYz+qAj8aCOSQo4SkdSZjRKzpdcbuY26nfGeESP/uk3H eh7DovnjcBIQm9S+Qa7MeA6uT/WtRYCcpTk56B6lsAKjcipiAxC4YN+6eajULcsR/rMX 9UMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@zytor.com header.s=2019091901 header.b=JkRxBmtd; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9si6335092edm.231.2019.11.03.14.02.12; Sun, 03 Nov 2019 14:02:36 -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=fail header.i=@zytor.com header.s=2019091901 header.b=JkRxBmtd; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728288AbfKCWBi (ORCPT + 99 others); Sun, 3 Nov 2019 17:01:38 -0500 Received: from terminus.zytor.com ([198.137.202.136]:55749 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728181AbfKCWBi (ORCPT ); Sun, 3 Nov 2019 17:01:38 -0500 Received: from [IPv6:2607:fb90:4e3e:9032:19ff:fb60:ee73:4ffc] ([IPv6:2607:fb90:4e3e:9032:19ff:fb60:ee73:4ffc]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id xA3M0uSX030800 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sun, 3 Nov 2019 14:00:59 -0800 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com xA3M0uSX030800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019091901; t=1572818461; bh=1dtJBXwpbDabMD1Gg7C4v+rSy3ncm7MJY6zt3M5CfrE=; h=Date:In-Reply-To:References:Subject:To:CC:From:From; b=JkRxBmtdjAY24HyqhOIivEXE2Iy7jCjPRKJhBixtEdeiGldzTx8WAbMzoXypJdw/D dxFx4qMlsm+nEEakdT3iB24SJ+vhcSD8hbP9AqFCKbwplfAnfQIZy2myP/4UWg6n5h cVaVztLhyG6k1Ekks/ImJskOn7V/2V1XugNuNcOsx0ZbtRRpm5hW/o2hhZoOeDFGT3 Q963QlMVqsUxSmYP9EwUSWJ4l7viUKAFXMZUg2JGPJGiwTcEvCcJbq3m22f3GOzbLx G5DumzMxQu5pp06n5MuHIFuhLqdaVOPMsTupd6/RPFvwbloTtEYK2kVtJIg+2Y5G0e RwEeORqHSgigA== Date: Sun, 03 Nov 2019 14:00:47 -0800 User-Agent: K-9 Mail for Android In-Reply-To: References: <20190620062246.2665-1-e5ten.arch@gmail.com> <20191029210250.17007-1-e5ten.arch@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v3] replace timeconst bc script with an sh script To: Ethan Sommer 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 From: hpa@zytor.com Message-ID: <40DC5B42-6C0D-4A5B-B23E-884ADB0108F0@zytor.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On November 3, 2019 1:56:50 PM PST, Ethan Sommer = wrote: >> Please let me point out, again, that bc *is* part of the basic POSIX >toolset, and the only tool in that toolset that allows for >arbitrary-precision arithmetic=2E That being said, GNU as, which we also >depends on, also contains bigint arithmetic, so it might be possible to >coax as into outputting ASCII output without manually implementing >bigints manually=2E >> >> Another option would be to use a C program linked with gmp=2E Binutils >requires gmp, so it doesn't inherently add dependencies, but running it >though as would probably be easier at least for the LLVM guys=2E >> >> I also have written a small, portable C bigint library, but that is a >lot of code to add to the tree=2E >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=2Ebc above 15000 I just didn't test any higher)=2E The program = is >here: http://ix=2Eio/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=2Ebc=2E The point isn't to make it work *now*, but getting it to *stay* work=2E --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E