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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

double x.to double( ) returns the double value next to x (i.e. rounding mode<br />

is always TO NEAREST ).<br />

double<br />

x.to double(bool& is double)<br />

as above, but also returns in is double whether the<br />

conversion was exact.<br />

double x.to double(double& abs err, rounding modes m = TO NEAREST )<br />

double x.to double(rounding modes m)<br />

as above, but with more flexibility: <strong>The</strong> parameter m<br />

specifies the rounding mode. For the returned value<br />

d, we have |x − d| ≤ abs err. (abs err is zero iff the<br />

conversion is exact and the returned value is finite.)<br />

as above, but does not return an error bound.<br />

rational x.to rational( ) converts x into a number of type rational.<br />

sz t<br />

sz t<br />

x.get significant length(void)<br />

x.get effective significant length(void)<br />

returns the length of the significant of x.<br />

returns the length of the significant of x without trailing<br />

zeros.<br />

integer x.get exponent(void) returns the exponent of x.<br />

integer<br />

x.get significant(void)<br />

returns the significant of x.<br />

sz t bigfloat :: set precision(sz t p)<br />

sz t bigfloat :: get precision( )<br />

sz t bigfloat :: set output precision(sz t d)<br />

sz t bigfloat :: set input precision(sz t p)<br />

sets the global arithmetic precision to p binary digits<br />

and returns the old value<br />

returns the currently active global arithmetic precision<br />

sets the precision of bigfloat output to d decimal digits<br />

and returns the old value<br />

sets the precision of bigfloat input to p binary digits<br />

and returns the old value<br />

rounding modes bigfloat :: set rounding mode(rounding modes m)<br />

sets the global rounding mode to m and returns the<br />

old rounding mode

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

Saved successfully!

Ooh no, something went wrong!