Algorithmic Solutions > LEDA > LEDA Guide > Number Types > Floating Point Filter

Floating Point Filter

The data type floatf provides a clean and efficient way to compute approximately with large integers.

Floating Point Filter encapsulates the conversion of operands to double and uses floating point arithmetic for computation. A floatf is represented by a double (its value) and an error bound. An operation on Floating Point Filter performs the operation on the values and also computes the error bound for the result.

Example of Floating Point Filter, Interval, and Integer Computation

Strengths

  • computes an error bound for the result of a computation
  • more efficient than arbitrary precision integer arithmetic
  • special function Sign(x) that computes the sign of x as +/-1, 0 or NO_IDEA. If Sign(x)!=NO_IDEA, the sign is guaranteed to be correct

Disadvantages

  • about 4 times slower than corresponding operations on doubles

Tips

Use Floating Point Filter to speed up your computations with large integers, and recompute with integer if the result is not unique.

See also:

Integers of Arbitrary Length

Algebraic Real Numbers

Rational Numbers

Big Floatingpoint Numbers

Interval Arithmetic


Vectors and Matrices with Integer Entries

Vectors and Matrices with Double Entries

Rational Vectors

Functions of numerical analysis


Manual Page Floating Point Filter




Please send any suggestions, comments or questions to leda@algorithmic-solutions.com
© Copyright 2001-2003, Algorithmic Solutions Software GmbH