LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Wed, 16 Jun 2010 10:40:16 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
On 16/06/2010 09:39, J.Fine wrote:
> From: Joseph Wright [[log in to unmask]]
>
> 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

ATOM RSS1 RSS2