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.

ool ispInf(const bigfloat& x)<br />

bool isnZero(const bigfloat& x)<br />

bool ispZero(const bigfloat& x)<br />

bool isZero(const bigfloat& x)<br />

bool isInf(const bigfloat& x)<br />

bool isSpecial(const bigfloat& x)<br />

int sign(const bigfloat& x)<br />

bigfloat abs(const bigfloat& x)<br />

bigfloat ipow2(const integer& p)<br />

integer ilog2(const bigfloat& x)<br />

integer ceil(const bigfloat& x)<br />

integer floor(const bigfloat& x)<br />

returns true if and only if x is in special state pInf<br />

returns true if and only if x is in special state nZero<br />

returns true if and only if x is in special state pZero<br />

returns true if and only if ispZero(x) or isnZero(x)<br />

returns true if and only if ispInf (x) or isnInf (x)<br />

returns true if and only if x is in a special state<br />

returns the sign of x.<br />

returns the absolute value of x<br />

returns 2 p<br />

returns the binary logarithm of abs(x), rounded up to the<br />

next integer. Precondition: x ≠ 0<br />

returns x, rounded up to the next integer<br />

returns x, rounded down to the next integer<br />

bigfloat sqrt d(const bigfloat& x, sz t p, int d = 2)<br />

returns d√ x, with relative error ≤ 2 −p but not necessarily<br />

exactly rounded to p binary digits<br />

string<br />

x.to string(sz t dec prec = global output prec)<br />

returns the decimal representation of x, rounded to a decimal<br />

precision of dec prec decimal places.<br />

bigfloat& x.from string(string s, sz t bin prec = global input prec)<br />

returns an approximation of the decimal number given by the<br />

string s by a bigfloat that is accurate up to bin prec binary<br />

digits

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

Saved successfully!

Ooh no, something went wrong!