Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s45841xp005647 for ; Mon, 5 May 2014 10:04:03 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx109) with ESMTPS (Nemesis) id 0MYtpf-1WKNnU2DUB-00VcjS for ; Mon, 05 May 2014 10:03:56 +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 s458192D016380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 May 2014 10:01:09 +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 s44M13JJ013656; Mon, 5 May 2014 10:01:08 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 10877940 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 5 May 2014 10:01:08 +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 s45818qZ018014 for ; Mon, 5 May 2014 10:01:08 +0200 Received: from smtp2.easily.co.uk (smtp2.easily.co.uk [62.128.146.103]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s458139m013502 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 5 May 2014 10:01:06 +0200 Received: from [109.146.66.234] (port=49678 helo=palladium.local) by smtp2.easily.co.uk with esmtpa (Exim 4.43) id 1WhDpf-00039P-BX for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 05 May 2014 09:01:03 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 References: <5366C875.9040709@googlemail.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=windows-1252 X-Spam-Check-Skipped: Loadavg 12.16 Message-ID: <5367453E.3030906@morningstar2.co.uk> Date: Mon, 5 May 2014 09:01:02 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: \__dim_strip_bp:n To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <5366C875.9040709@googlemail.com> 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 s458192D016380 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:HWmMuQMLQuc=:ltH+4gV8A8/G+6ZXotFlxmrhVx vjnVn/w8aeBmIMBz3TlbTsHM587L00HnNpDKJLK+j9LuAbdD890JviU4knfRZ2z05g9H8y4IA ytaljTjyUIaOpIK7mj2yGb6HqVzZZdYjDm6cpLOexvzVSKErLsOSzziKnN7Qz5OzGa2Mlm1Ah CSC7IM1QxjH7pTW2o+OBfBhyY7/xn+obwkkFW2aF11p/AaHABycFWnpD3cFg111BZTnFgap/X NOO7see91VsdUgtRdINz5rDGvhupxe/9KzKTQG+dsOJicuENJhjkT6IAYv9Gfg8tUyM8qRp/m xi19T5vVYHQgsLG7DPL9CWg7G6uz9inSnUOf0m4opsEXAIgImBmTHbZaMOHTOCjqrAHsEkxsT s3F00G77QDyr8kFjH2l5AeUJBuZWVPqZXs8NcNPYE31KdPYh70plDVX4e1qh2ii8fwHpmxHtU XwHdff+2OVQ4XHF3GuwtiaDDBlJOtsZNzZYYSDuac1CesQJl4m3S+CSuxnUkM3BoPNKnk1iUq qWqTXnjWf1cbENhxYLm4eV/bsFMtutKX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im_strip_bp:n is defined in l3skip.dtx the following way: >=20 > \cs_new:Npn \__dim_strip_bp:n #1 > { \__dim_strip_pt:n { 0.996 26 \__dim_eval:w #1 \__dim_eval_end: } = } >=20 > The calculation from bp to bp is essentially: >=20 > \dimexpr 0.99626\dimexpr #1\relax\relax >=20 > 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 =91scaling=92 operations (a multiplication immediately followed > | by a division) which are performed as one combined operation > | with a 64-bit product as intermediate value. >=20 > Improved version with higher precision: >=20 > \cs_new:Npn \__dim_strip_bp:n #1 > { > \__dim_strip_pt:n > { > \__dim_eval:w ( #1 ) * 800 / 803 \__dim_eval_end: > } > } >=20 > * 800/803 is the integer fraction for 72/72.27 > * The parentheses around #1 ensure, that #1 is > calculated first. >=20 > Yours sincerely > Heiko Oberdiek >=20 Altered in the trunk: will feature in the next release. -- Joseph Wright --=20 Joseph Wright Tel. 01604 810094 Morning Star Mobile 07974 148180 2 Dowthorpe End Skype josephawright Earls Barton Northants NN6 0NH