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 o5G9gngr018082 for ; Wed, 16 Jun 2010 11:42:50 +0200 Received: (qmail 7052 invoked by alias); 16 Jun 2010 09:42:44 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 16 Jun 2010 09:42:42 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx088) with SMTP; 16 Jun 2010 11:42:42 +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 o5G9eYpa017094 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Jun 2010 11:40:34 +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 o5FM15eo020186; Wed, 16 Jun 2010 11:40:31 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 436069 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 16 Jun 2010 11:40:31 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id o5G9eVma019089 for ; Wed, 16 Jun 2010 11:40:31 +0200 Received: from ueamailgate01.uea.ac.uk (ueamailgate01.uea.ac.uk [139.222.131.184]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id o5G9ePng007038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 16 Jun 2010 11:40:29 +0200 Received: from ueams01.uea.ac.uk (ueams01.uea.ac.uk [139.222.131.78]) by ueamailgate01.uea.ac.uk (8.13.8/8.13.8) with ESMTP id o5G9eFk2031999 for ; Wed, 16 Jun 2010 10:40:15 +0100 Received: from [139.222.113.126] by ueams01.uea.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1OOp6T-0002TR-Lu for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 16 Jun 2010 10:40:13 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 References: <4C17EAC4.60705@morningstar2.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Bayes-Prob: 0.9999 (Score 5, tokens from: @@RPTN, outgoing) X-CanIt-Geo: ip=139.222.131.78; country=GB; region=I9; city=Norwich; latitude=52.6333; longitude=1.3000; http://maps.google.com/maps?q=52.6333,1.3000&z=6 X-CanItPRO-Stream: UEA:outgoing (inherits from UEA:default,base:default) X-Canit-Stats-ID: 51952454 - 6c059565e6ef - 20100616 X-Scanned-By: CanIt (www . roaringpenguin . com) on 139.222.131.184 Message-ID: <4C189C00.7050603@morningstar2.co.uk> Date: Wed, 16 Jun 2010 10:40:16 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: l3fp: A floating point unit for expl3 To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p6i75npGen84eVAEFK/syJmiNoEBJhgjYKpglu1TZLLw7xMZnJMXwBFK0zrU udEInhYyaWAzwtcf5K2pCdD+gZ2/z4PnBLkwixZI+pVtXqOlCN41sOWgjaVeH7+UhPxHlGxFK/rc sw7fg==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: 6339 On 16/06/2010 09:39, J.Fine wrote: > From: Joseph Wright [joseph.wright@MORNINGSTAR2.CO.UK] > > In terms of input range, I've gone for -999999999.999999999 to > +999999999.999999999. This should be sufficient for a wide range of > purposes (for example, if you convert a dimen into a floating point > number in units pt then you are safe for any dimen TeX can handle). > > ==== > > Please would you clarify for me, Joseph. Does this package provide floating point numbers, as described in: > http://en.wikipedia.org/wiki/Floating_point > >> From what you've written above it seems that your implementing fixed point. > http://en.wikipedia.org/wiki/Fixed-point_arithmetic > namely "a fixed number of digits after (and sometimes also before) the radix point". Currently the number of dp is fixed, so formally "fixed point arithmetic", but following Peter's suggestion I will be adding the facility to deal with floating point numbers (range yet to be decided). Quite how to deal with the overlap at the low end I'm not yet quite sure. At least for division it makes sense to convert small numbers (e.g. 0.0001) into their exponent form. I'll probably take the approach a pocket calculator does and convert 0.001 downward into the exponent form, for output for add/sub/mul (etc.) and at the input stage for div. -- Joseph Wright