UserManual

real

The module `real' provides arbitrary precision real numbers and their utilities. The functions provided are corresponding to the `math' standard module.

Functions

exp(x, err=defaultError)

Return exponential of x.

sqrt(x, err=defaultError)

sqrt(x [,err]) returns the positive square root of real number x.

log(x, base=None, err=defaultError)

log(x) returns logarithm of a positive number x. If an additional argument base is given, it returns logarithm of x to the base.

log1piter(x)

iterator for log(1+x).

piGaussLegendre(err=defaultError)

piGaussLegendre computes pi by Gauss-Legendre algorithm.

eContinuedFraction(err=defaultError)

Compute the base of natural logarithm e by continued fraction expansion.

floor(x)

floor(x) returns the integer; if x is an integer then x itself, otherwise the biggest integer less than x.

ceil(x)

ceil(x) returns the integer; if x is an integer then x itself, otherwise the smallest integer greater than x.

tranc(x)

tranc(x) returns the integer; if x is an integer then x itself, otherwise the nearest integer to x. If x has the fraction part 1/2, then bigger one will be chosen.

sin(x, err=defaultError)

sin(x [,err]) returns the sine of x.

cos(x, err=defaultError)

cos(x [,err]) returns the cosine of x.

tan(x, err=defaultError)

tan(x [,err]) returns the tangent of x.

sinh(x, err=defaultError)

sinh(x [,err]) returns the hyperbolic sine of x.

cosh(x, err=defaultError)

cosh(x [,err]) returns the hyperbolic cosine of x.

tanh(x, err=defaultError)

tanh(x [,err]) returns the hyperbolic tangent of x.

acos(x, err= defaultError)

acos(x [,err]) returns arc cosine of x.

asin(x, err=defaultError)

asin(x [,err]) returns arc sine of x.

atan(x, err=defaultError)

atan(x [,err]) returns arc tangent of x.

atan2(y, x, err=defaultError)

atan2(y, x [,err]) returns the arc tangent of y/x. Unlike atan(y/x), the signs of both x and y are considered.
It is unrecomended to obtain the value of pi with atan2(0,1).

hypot(x, y, err=defaultError)

hypot(x, y [,err]) returns sqrt(x**2 + y**2).

pow(x, y, err=defaultError)

x ** y

degrees(rad, err=defaultError)

converts angle rad from radians to degrees.

radians(deg, err=defaultError)

converts angle deg from degrees to radians.

fabs(x)

returns absolute value of x.

fmod(x, y)

returns x - n * y, where n is the quotient of x / y, rounded towards zero to an integer.

frexp(x)

returns a tuple (m, e) where x = m * 2 ** e, 1/2 <= abs(m) < 1 and e is an integer. This function is provided as the counter-part of math.frexp, but it might not be useful.

ldexp(x, i)

returns x * 2 ** i.

EulerTransform(iterator)

Return an iterator which yields terms of Euler transform of the given iterator.

Classes

Constants


Last-modified: 2005-12-18 (Æü) 17:49:40