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.

void<br />

x.set midpoint(VOLATILE I double num, VOLATILE I double error)<br />

sets the current interval to a superset of [num −<br />

error, num + error], i.e., to an interval with midpoint<br />

num and radius error.<br />

bool x.sign is known( ) returns true if and only if all numbers in the interval<br />

x have the same sign<br />

int x.sign( ) returns the sign of all numbers in the interval x if<br />

this sign is unique; aborts with an error message if<br />

x.sign is known( ) gives false<br />

3. Implementation<br />

<strong>The</strong> types interval round inside and interval round outside represent intervals directly<br />

by (the negative of) its lower bound and its upper bound as doubles. Here all<br />

arithmetic operations require that the IEEE754 rounding mode ”towards +∞” is active.<br />

For type interval round inside this is done inside each operation, and for type<br />

interval round outside the user has to do this manually ”from outside the operations” by<br />

an explicit call of fpu :: round up( ).<br />

<strong>The</strong> types interval bound absolute and interval bound relative represent intervals by their<br />

double midpoint NUM and diameter ERROR. <strong>The</strong> interpretation is that NUM is the<br />

numerical approximation of a real number and ERROR is a bound for the absolute,<br />

respectively relative error of NUM .

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

Saved successfully!

Ooh no, something went wrong!