Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(3)  |  Derive(0)  |  Import(3)
Compute s**t. Raises ComplexResult if s is negative and t is
fractional.

        def mpf_pow(s, t, prec, rnd=round_fast):
    """
    Compute s**t. Raises ComplexResult if s is negative and t is
    fractional.
    """
    ssign, sman, sexp, sbc = s
    tsign, tman, texp, tbc = t
    if ssign and texp < 0:
        raise ComplexResult("negative number raised to a fractional power")
    if texp >= 0:
        return mpf_pow_int(s, (-1)**tsign * (tman<
    


src/s/y/sympy-polys-HEAD/sympy/core/numbers.py   sympy-polys(Download)
import sympy.mpmath as mpmath
import sympy.mpmath.libmp as mlib
from sympy.mpmath.libmp import mpf_pow, mpf_pi, mpf_e, phi_fixed
import decimal
 
            b = b._mpf_
            try:
                y = mpf_pow(b, e, prec, rnd)
                return Real._new(y, prec)
            except mlib.ComplexResult:

src/s/y/sympy-polys-HEAD/sympy/core/evalf.py   sympy-polys(Download)
from sympy.mpmath.libmp.libmpf import dps_to_prec
from sympy.mpmath import mpf, mpc, quadts, quadosc, mp, make_mpf, make_mpc
from sympy.mpmath.libmp import (mpf_pi, mpf_log, mpf_pow, mpf_sin, mpf_cos,
        mpf_atan, mpf_atan2, mpf_e, mpf_exp, from_man_exp, from_int)
from sympy.mpmath.libmp.backend import MPZ
    # positive ** real
    else:
        return mpf_pow(xre, yre, target_prec), None, target_prec, None
 
 

src/s/y/sympy-HEAD/sympy/core/evalf.py   sympy(Download)
from sympy.mpmath import make_mpc, make_mpf, mp, mpc, mpf, nsum, quadts, quadosc
from sympy.mpmath import inf as mpmath_inf
from sympy.mpmath.libmp import (from_int, from_man_exp, from_rational, fhalf,
        fnan, fnone, fone, fzero, mpf_abs, mpf_add,
        mpf_atan, mpf_atan2, mpf_cmp, mpf_cos, mpf_e, mpf_exp, mpf_log, mpf_lt,
    # positive ** real
    else:
        return mpf_pow(xre, yre, target_prec), None, target_prec, None