Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s459SuRh006060 for ; Mon, 5 May 2014 11:28:57 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx002) with ESMTPS (Nemesis) id 0MbPoC-1WOTri0GOq-00IjkN for ; Mon, 05 May 2014 11:28:51 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id s459Q6iQ006591 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 May 2014 11:26:06 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s458IJXF013656; Mon, 5 May 2014 11:26:05 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 10881321 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 5 May 2014 11:26:05 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s459Q5kq002191 for ; Mon, 5 May 2014 11:26:05 +0200 Received: from fencepost.gnu.org (fencepost.gnu.org [208.118.235.10]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s459PTTi004846 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 5 May 2014 11:25:33 +0200 Received: from localhost ([127.0.0.1]:55517 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhEor-0000RU-1D; Mon, 05 May 2014 05:04:17 -0400 Received: by lola (Postfix, from userid 1000) id 066C8E048F; Mon, 5 May 2014 11:04:06 +0200 (CEST) References: <5366C875.9040709@googlemail.com> <536751EB.5010207@latex-project.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id s459Q5kq002194 Message-ID: <87ha54tx4q.fsf@fencepost.gnu.org> Date: Mon, 5 May 2014 11:04:05 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: David Kastrup Subject: Re: \__dim_strip_bp:n To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <536751EB.5010207@latex-project.org> (Frank Mittelbach's message of "Mon, 5 May 2014 10:55:07 +0200") Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by relay.uni-heidelberg.de id s459Q6iQ006591 Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:1KiXfUFxLsA=:ZLLyxqsIb5zCJyeQU7EFis7VwE ozydokJyxolWyd0UojTVxyYZiJypQIAHZggumAhg7ntYHoWoT6Hd75PgiLfmc1O55wnDxfXZa StMUO2Ie7zkvDPctvmB4EwwothXAlAJkKRjaMyUPR2n1vTqY+7IyGyEavZp4rDYOOf80uauv0 OF83MU1Gxmsve23A2GcHSmljUc9rN1YA7s8aSAjuNPrDyhZIS37XHFDRpJaFXKIRBf0uMewt6 PPr459sti8eqZy5dTyTjdleCbxOLmlCj0DJfM8h10wIe+Z5verO4ZaMPc9wTtHuKC3Dmj69Tx qSUzXubbGcf70iHYjSVm0v1qCjZDEAJ32EDAALPxQbpq2AdK4yb6um/1IaIK0PBXbXIiRyReU TE7gAlLQvKpfFUTCPB46tMQCnqhodF+JIzLILl8JUTwX2/Te11/XJTVwy7ndLPqTPxYCIRVrB dYcQKdIbn+CoC35JorG03ZBa9JNesw277fM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: X-Keywords: X-UID: 7390 Frank Mittelbach writes: > Am 05.05.2014 01:08, schrieb Heiko Oberdiek: >> Improved version with higher precision: >> >> \cs_new:Npn \__dim_strip_bp:n #1 >> { >> \__dim_strip_pt:n >> { >> \__dim_eval:w ( #1 ) * 800 / 803 \__dim_eval_end: >> } >> } >> >> * 800/803 is the integer fraction for 72/72.27 > > > perhaps I'm completely off the mark, but isn't this introducing a > restriction on the values that can be entered? (ie generating an > overflow by doing *800 first) You are completely off the mark. Let me reinstate what you cut from Heiko's posting: >> Of course, there will always be rounding errors, but the code >> can be improved by a scaling operation inside e-TeX's \dimexpr, >> from "The e-TeX manual": >>=20 >> | The arithmetic operations are performed individually, except >> | for =E2=80=98scaling=E2=80=99 operations (a multiplication immediate= ly followed >> | by a division) which are performed as one combined operation >> | with a 64-bit product as intermediate value. --=20 David Kastrup