From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id D9D55E1F241 for <9fans@9fans.net>; Mon, 16 Dec 2019 16:41:33 -0500 (EST) (envelope-from lyndon@orthanc.ca) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id EBD59A86E4C; Mon, 16 Dec 2019 16:41:33 -0500 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1576532493; b=I+qjOTdqUiOYXRQapP3HSjXAGtLTzrxzFir0A5ze1bHbttr5Xk xWHUXEU0/IigsXGy+QgFKDMfnJPvsLZfXG4+daOf2wd2Y8RF+UxogOoCUD7gqt8l ujjIqpKtv90b1WcjqYAokKqRPco4evXPHM4272u9Cs4rJPfat14TW84W0T5k2MSU 3vaAwYyJ90pTyvToyoePniningC9YnZ4/sj1TEOfqSACawo2oyQVnXTvLlr1OULC hhTp5EDMh+2eKASxwL8z0+DS1eddRfPJgqo/+4PO4Kwfa1jwA83SSknCgnIo4In7 NrplfE28YsS5i+pGInSjAOtuYPCMJoz3uCUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=from:to:subject:reply-to:mime-version :content-type:content-id:content-transfer-encoding:date :message-id; s=arcseal; t=1576532493; bh=915i4al5ADvpFtX/wCwKp1S 9lBcmh+j4WpG7XPRw4EM=; b=odsOf7f8xi1wUCGKJCGo8jE9HRvDh/gdRK9us7W EhmpJst9itVEd42HOyBeAMU9yfbXwVYSK2h/OdwuaSPI/SQLy0MwBoWrw9HIB4bi 6fztoDvyzxmgXYwMEKC4HJYeUXNMjJ7urq8XpmQlJ5fjeWyT3EcHukj0mzwFfwoZ BCj6lhnfH8cbHNfhX1+0CZDnlN6RWbXZtVNwsh7eLj1h7t8ffiiJpT2RHH6r2kr7 2y8UoWnc06+hA2oEnV3oL0JQzd8ov0mK5weKsa4ALaBnfIK0XVwec0GeijiPGbMP IXrAinm7XEkkA7KsYJSXPkEkLD52mdCcblgqctG1sK7j2pg== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=orthanc.ca; iprev=pass smtp.remote-ip=208.79.93.154 (orthanc.ca); spf=pass smtp.mailfrom=lyndon@orthanc.ca smtp.helo=orthanc.ca; x-aligned-from=pass (Address match); x-ptr=pass smtp.helo=orthanc.ca policy.ptr=orthanc.ca; x-return-mx=pass header.domain=orthanc.ca policy.is_org=yes (MX Record found); x-return-mx=pass smtp.domain=orthanc.ca policy.is_org=yes (MX Record found); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 Authentication-Results: tb-mx1.topicbox.com; arc=none (no signatures found); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=orthanc.ca; iprev=pass smtp.remote-ip=208.79.93.154 (orthanc.ca); spf=pass smtp.mailfrom=lyndon@orthanc.ca smtp.helo=orthanc.ca; x-aligned-from=pass (Address match); x-ptr=pass smtp.helo=orthanc.ca policy.ptr=orthanc.ca; x-return-mx=pass header.domain=orthanc.ca policy.is_org=yes (MX Record found); x-return-mx=pass smtp.domain=orthanc.ca policy.is_org=yes (MX Record found); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedufedrvddthedgudehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvuf hrgggtgfffkfesthhqredttddtvdenucfhrhhomhepnfihnhguohhnucfpvghrvghnsggv rhhguceolhihnhguohhnsehorhhthhgrnhgtrdgtrgeqnecukfhppedvtdekrdejledrle efrdduheegnecurfgrrhgrmhepihhnvghtpedvtdekrdejledrleefrdduheegpdhhvghl ohepohhrthhhrghntgdrtggrpdhmrghilhhfrhhomhepoehlhihnughonhesohhrthhhrg hntgdrtggrqeenucevlhhushhtvghrufhiiigvpedt X-ME-VSCategory: clean Received-SPF: pass (orthanc.ca: 208.79.93.154 is authorized to use 'lyndon@orthanc.ca' in 'mfrom' identity (mechanism 'ip4:208.79.93.154' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="lyndon@orthanc.ca"; helo=orthanc.ca; client-ip=208.79.93.154 Received: from orthanc.ca (orthanc.ca [208.79.93.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx1.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Mon, 16 Dec 2019 16:41:32 -0500 (EST) (envelope-from lyndon@orthanc.ca) Received: from orthanc.ca (localhost [127.0.0.1]) by orthanc.ca (OpenSMTPD) with ESMTP id 2a19e32d for <9fans@9fans.net>; Mon, 16 Dec 2019 13:41:31 -0800 (PST) From: Lyndon Nerenberg To: Plan 9 from Bell Labs <9fans@9fans.net> Subject: dc(1) exponent limits reply-to: lyndon@orthanc.ca MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <39334.1576532491.1@orthanc.ca> Content-Transfer-Encoding: quoted-printable Date: Mon, 16 Dec 2019 13:41:31 -0800 Message-ID: Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: d6c69880-204c-11ea-b0f2-a71c94bae002 While running some silly benchmarks I discovered dc's '^' operator limits exponents to '9999'. This seems arbitrary, perhaps a leftover safety measure to keep things from eating all the CPU for days on end on a slow machine? I upped the limit to 99999 and the test expression ran fine on a Pi4: /n/dump/2019/1215.2/sys/src/cmd/dc.c:328,334 - dc.c:328,334 neg++; chsign(arg1); } - if(length(arg1)>=3D3) { + if(length(arg1)>=3D4) { error("exp too big\n"); } savk =3D sunputc(arg2); If you're feeling bored and apply the above patch, consider running this mini-bench and mailing the output directly to me: echo -n `{cat /dev/cputype}^' ** ' ; echo 652342 52342 '^' 34232342 / p q = | time dc >/dev/null It will take a while to run (50 minutes on the Pi4). --lyndon