Re: floating point representation in IC

From: <wh_at_icparc.ic.ac.uk>
Date: Fri 19 Nov 2004 12:20:55 PM GMT
Message-ID: <20041119122055.GA12453@tempest.icparc.ic.ac.uk>
Hi Chris,

On Fri, Nov 19, 2004 at 09:55:30AM -0000, Chris Meudec wrote:
> Hi all,
> just a few questions regarding the underlying implementation of the IC 
> library.
> 
> 1 Does its implementation respects IEEE-754 (the standard for 
> floating point processing) ?  ...

?  I haven't really looked at the IEEE-754 spec, but I don't think it
addresses interval arithmetic.  (Heck, if it did it would have made our
lives much easier.  :)  So I'm not sure exactly what you're asking here.

All floating point interval based computation in ECLiPSe (IC + bounded real
arithmetic) is "safe" - i.e. we aim to guarantee that the true result lies
between the computed bounds: anything else is a bug that should be reported.
How this is done depends on the operation being performed.  For basic
arithmetic operations (+, -, *, /) we currently use the processor's floating
point rounding modes; for others we simply widen the interval slightly based
on the possible error in the computation.  This should not be relied upon
though: we make no guarantees about how "tight" the resulting intervals are,
and this has actually changed over time (e.g. when we started using the
processor rounding modes for some computations).

We also don't specify the precision (number of bits) of the floating point
numbers used - e.g. on i386-derived processors we don't specify whether to
use 80 bits or 64 bits for internal computation (though they're written out
to memory as standard 64-bit doubles, and we make sure that any rounding
that occurs here is done in the appropriate direction).  Note that this
means that different configurations of ECLiPSe running on the same hardware
can give different results (e.g. if you embed ECLiPSe into Java, the Java
process may change the processor's internal precision).  It should be safe
to assume at least IEEE-754 64-bit doubles - I'd be very surprised if our
test suite passed with anything less than that.

> 2 If IC uses double binary floating-point numbers by default, can we 
> switch to a single floating-point number representation?

No.

May I ask what you want this information for?

Cheers,
Warwick
Received on Fri Nov 19 12:22:46 2004

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:31 PM GMT GMT