Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id o7DCQBM1003370 for ; Fri, 13 Aug 2010 14:26:12 +0200 Received: (qmail 16158 invoked by alias); 13 Aug 2010 12:26:06 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 13 Aug 2010 12:26:01 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx068) with SMTP; 13 Aug 2010 14:26:01 +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 o7DCNS6U004357 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Aug 2010 14:23:28 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id o7CM18pF014066; Fri, 13 Aug 2010 14:23:46 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 440394 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 13 Aug 2010 14:23:46 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id o7DCNjNL022760 for ; Fri, 13 Aug 2010 14:23:46 +0200 Received: from lon1-post-1.mail.demon.net (lon1-post-1.mail.demon.net [195.173.77.148]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id o7DCN7jZ004034 for ; Fri, 13 Aug 2010 14:23:13 +0200 Received: from morningstar2.demon.co.uk ([80.176.134.7] helo=palladium.local) by lon1-post-1.mail.demon.net with esmtp (Exim 4.69) id 1OjtIJ-0002Xa-Yq for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 13 Aug 2010 12:23:32 +0000 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4C653943.5090606@morningstar2.co.uk> Date: Fri, 13 Aug 2010 13:23:31 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: l3fp: A floating point unit for expl3 To: LATEX-L@listserv.uni-heidelberg.de Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p4WX0t+AtsdW2ORvUlAfcdSIdQlIL3FTSFQDxQiodii41fjuqHQd8jenp0+N dNY0CcAB8WAv7r3OtvsaDOOiC4T8TWFW3c0h9kbMpE0/ou/MWvK8X//VR9J5RqCotAZER8h4O06e mC19Q==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6357 Hello all, A while ago I posted a message concerning my initial commit to the SVN of a module for LaTeX3 for mathematics with real numbers. After a bit of work (and some reading) I've decided that it is better to go with a floating point approach rather than the initial fixed point arithmetic. I've just committed the base arithmetic part of the module to the SVN. The aim is to support two general areas, typesetting requirements and processing scientific data. For the arithmetic operations, I've therefore gone for an output precision of +-1 in the last (10th) place, and an input range up to 9.999999999e99. As this is all being done in TeX I hope that the balance makes sense to people. The next thing to look at adding is trigonometric functions, as these are needed for typesetting arbitrary rotations. I'm also hoping to include exponents/logarithms when time allows. Obviously, I'd be happy to hear about other functions that might be useful or indeed better implementations for the ones that are provided. The basic functions that I've added should hopefully work properly. I'm also hopeful that now I've had time to 'polish' things a bit these should be broadly stable. Please do try them out and report back any issues. I'll certainly be doing this in siunitx, where I'm planning to use the fpu to support some additional features. An obvious approach to floating point work is to use LuaTeX, which can do these things natively. Currently, expl3 works across all of the modern engines, and so a LuaTeX-only solution isn't really applicable. However, I will be looking at using Lua when available. In the fpu context that will mean keeping the documented functions (\fp_add:Nn, etc.) but swapping out the internals to use the much faster native arithmetic Lua provides. I'll look at this area after the fpu covers trig and log functions. -- Joseph Wright