31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Without this assistance, reals automatically compute a weaker bound of |Ẽ| ≥ 2−56k−161<br />

for Ẽ ≠ 0 by [15].<br />

We turn to the line segment intersection problem next. Assume that all endpoints have<br />

k–bit integer homogeneous coordinates. This implies that the intersection points have<br />

homogeneous coordinates (X, Y, W ) where X, Y and W are (4 k + 3) - bit integers. <strong>The</strong><br />

Bentley–Ottmann plane sweep algorithm for segment intersection [65] needs to sort points<br />

by their x–coordinates, i.e., to compare fractions X 1 /W 1 and X 2 /W 2 where X 1 , X 2 , W 1 , W 2<br />

are as above. This boils down to determining the sign of the 8k + 7 bit integer X 1 ∗ W 2 −<br />

X 2 ∗W 1 . If all variables X i , W i are declared real then their sign test will be performed quite<br />

efficiently. First, an interval approximation is computed and then, if necessary, bigfloat<br />

approximations of increasing precision. In many cases, the interval approximation already<br />

determines the sign. In this way, the user of the data type real gets nearly the efficiency<br />

of a hand-coded floating point filter [35, 66] without any work on his side. This is in<br />

marked contrast to [35, 66] and will be incorporated into [65].

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!