sdkagent

mpmath API reference

75 public APIs from mpmath (mpmath/mpmath) — 14 classes, 59 functions, 2 methods. Signatures extracted by static analysis of the actual source.

Repository: mpmath/mpmath

KindCount
Classes14
Functions59
Methods2

API list

classmpmath.__main__.MpmathConsole
An interactive console with readline support.
classmpmath.calculus.optimization.Bisection
1d-solver generating pairs of approximative root and error.
classmpmath.calculus.optimization.Brent
1d-solver generating pairs of approximative root and error.
classmpmath.calculus.optimization.Halley
1d-solver generating pairs of approximative root and error.
classmpmath.calculus.optimization.Illinois
1d-solver generating pairs of approximative root and error.
classmpmath.calculus.optimization.MNewton
1d-solver generating pairs of approximative root and error.
classmpmath.calculus.optimization.ModAB
1d-solver generating pairs of approximative root and error.
classmpmath.calculus.optimization.Muller
1d-solver generating pairs of approximative root and error.
classmpmath.calculus.optimization.Newton
1d-solver generating pairs of approximative root and error.
classmpmath.calculus.optimization.Ridder
1d-solver generating pairs of approximative root and error.
classmpmath.calculus.optimization.Secant
1d-solver generating pairs of approximative root and error.
classmpmath.ctx_iv.ivmpf
Interval arithmetic class.
classmpmath.ctx_mp.MPContext
Context for multiple precision floatng-point arithmetic.
methodmpmath.ctx_mp.MPContext.isnpint(x)
Determine if *x* is a nonpositive integer.
methodmpmath.ctx_mp.MPContext.ldexp(x, n)
Computes `x 2^n` efficiently.
classmpmath.ctx_mp_python.mpnumeric
Base class for mpf and mpc.
funcmpmath.functions.bessel.j0(ctx, x)
Computes the Bessel function `J_0(x)`.
funcmpmath.functions.bessel.j1(ctx, x)
Computes the Bessel function `J_1(x)`.
funcmpmath.functions.qfunctions.qfac(ctx, z, q, *maxterms=None)
Evaluates the q-factorial, ..
funcmpmath.functions.qfunctions.qgamma(ctx, z, q, *maxterms=None)
Evaluates the q-gamma function ..
funcmpmath.functions.rszeta.z_half(ctx, t, der=0)
z_half(t,der=0) Computes Z^(der)(t)
funcmpmath.functions.rszeta.zeta_offline(ctx, s, k=0)
Computes zeta^(k)(s) off the line
funcmpmath.functions.zetazeros.search_supergood_block(ctx, n, fp_tolerance)
To use for n>400 000 000
funcmpmath.functions.zetazeros.wpzeros(t)
Precision needed to compute higher zeros
funcmpmath.libfp.zeta(s, **kwargs)
Riemann zeta function, real argument
funcmpmath.libmp.gammazeta.zeta_array(N, prec)
zeta(n) = A * pi**n / n!
funcmpmath.libmp.libelefun.e_fixed(prec)
Computes exp(1).
funcmpmath.libmp.libelefun.exp_basecase(x, prec)
Compute exp(x) as a fixed-point number.
funcmpmath.libmp.libelefun.exp_expneg_basecase(x, prec)
Computation of exp(x), exp(-x)
funcmpmath.libmp.libelefun.exponential_series(x, prec, type=0)
Taylor series for cosh/sinh or cos/sin.
funcmpmath.libmp.libelefun.ln10_fixed(prec)
Computes ln(10).
funcmpmath.libmp.libelefun.ln2_fixed(prec)
Computes ln(2).
funcmpmath.libmp.libelefun.log_taylor(x, prec, r=0)
Fixed-point calculation of log(x).
funcmpmath.libmp.libelefun.mpf_cbrt(s, prec, rnd=round_down)
cubic root of a positive number
funcmpmath.libmp.libelefun.mpf_log1p(x, prec, rnd=round_down)
Computes log(1+x) accurately.
funcmpmath.libmp.libelefun.mpf_pow(s, t, prec, rnd=round_down)
Compute s**t.
funcmpmath.libmp.libelefun.phi_fixed(prec)
Computes the golden ratio, (1+sqrt(5))/2
funcmpmath.libmp.libhyper.mpc_agm(a, b, prec, rnd=round_down)
Complex AGM.
funcmpmath.libmp.libhyper.mpf_ci_si_taylor(x, wp, which=0)
0 - Ci(x) - (euler+log(x)) 1 - Si(x)
funcmpmath.libmp.libintmath.ifac2(n, memo_pair=[{0: 1}, {1: 1}])
Return n!!
funcmpmath.libmp.libintmath.isprime(n)
Determines whether n is a prime number.
funcmpmath.libmp.libintmath.jacobi_symbol(m, n)
Returns the Jacobi symbol (m / n).
funcmpmath.libmp.libintmath.lshift(x, n)
For an integer x, calculate x << n.
funcmpmath.libmp.libintmath.stirling1(n, k)
Stirling number of the first kind.
funcmpmath.libmp.libintmath.stirling2(n, k)
Stirling number of the second kind.
funcmpmath.libmp.libintmath.trailing(n)
Count the number of trailing zero bits in abs(n).
funcmpmath.libmp.libmpc.mpc_arg(z, prec, rnd=round_down)
Argument of a complex number.
funcmpmath.libmp.libmpc.mpc_cbrt(z, prec, rnd=round_down)
Complex cubic root.
funcmpmath.libmp.libmpc.mpc_cos(z, prec, rnd=round_down)
Complex cosine.
funcmpmath.libmp.libmpc.mpc_cosh(z, prec, rnd=round_down)
Complex hyperbolic cosine.
funcmpmath.libmp.libmpc.mpc_div_mpf(z, p, prec, rnd=round_down)
Calculate z/p where p is real
funcmpmath.libmp.libmpc.mpc_exp(z, prec, rnd=round_down)
Complex exponential function.
funcmpmath.libmp.libmpc.mpc_mul(z, w, prec, rnd=round_down)
Complex multiplication.
funcmpmath.libmp.libmpc.mpc_nthroot(z, n, prec, rnd=round_down)
Complex n-th root.
funcmpmath.libmp.libmpc.mpc_reciprocal(z, prec, rnd=round_down)
Calculate 1/z efficiently
funcmpmath.libmp.libmpc.mpc_sin(z, prec, rnd=round_down)
Complex sine.
funcmpmath.libmp.libmpc.mpc_sinh(z, prec, rnd=round_down)
Complex hyperbolic sine.
funcmpmath.libmp.libmpc.mpc_sqrt(z, prec, rnd=round_down)
Complex square root (principal branch).
funcmpmath.libmp.libmpc.mpc_tan(z, prec, rnd=round_down)
Complex tangent.
funcmpmath.libmp.libmpc.mpc_tanh(z, prec, rnd=round_down)
Complex hyperbolic tangent.
funcmpmath.libmp.libmpf.from_int(n, prec=0, rnd=round_down)
Create a raw mpf from an integer.
funcmpmath.libmp.libmpf.from_man_exp(man, exp, prec=0, rnd=round_down)
Create raw mpf from (man, exp) pair.
funcmpmath.libmp.libmpf.gmpy_mpf_mul_int(s, n, prec, rnd=round_down)
Multiply by a Python integer.
funcmpmath.libmp.libmpf.mpf_add(s, t, prec=0, rnd=round_down, _sub=0)
Add the two raw mpf values s and t.
funcmpmath.libmp.libmpf.mpf_cmp(s, t)
Compare the raw mpfs s and t.
funcmpmath.libmp.libmpf.mpf_div(s, t, prec, rnd=round_down)
Floating-point division
funcmpmath.libmp.libmpf.mpf_eq(s, t)
Test equality of two raw mpfs.
funcmpmath.libmp.libmpf.mpf_mul(s, t, prec=0, rnd=round_down)
Multiply two raw mpfs
funcmpmath.libmp.libmpf.mpf_sub(s, t, prec=0, rnd=round_down)
Return the difference of two raw mpfs, s-t.
funcmpmath.libmp.libmpf.python_mpf_mul_int(s, n, prec, rnd=round_down)
Multiply by a Python integer.
funcmpmath.libmp.libmpf.str_to_man_exp(x, base=10)
Helper function for from_str.
funcmpmath.libmp.libmpf.to_float(s, strict=False, rnd=round_down)
Convert a raw mpf to a Python float.
funcmpmath.libmp.libmpf.to_int(s, rnd=round_down)
Convert a raw mpf to the nearest int.
funcmpmath.libmp.libmpf.to_man_exp(s, signed=True)
Return (man, exp) of a raw mpf.
funcmpmath.libmp.libmpf.to_rational(s)
Convert a raw mpf to a rational number.

About this data

These signatures were extracted from the public source of mpmath/mpmath using Python's ast module. Argument names, default values, type annotations and return types are taken verbatim from the code. Implementation bodies are never stored. See how it works for details.

Back to all 805 libraries