Lines Matching refs:yc
2076 # value of other. Write x = xc*10**xe and abs(y) = yc*10**ye, with xc
2077 # and yc positive integers not divisible by 10.
2105 # (2) must apply. Now |y| < 1/nbits(xc) iff |yc|*nbits(xc) <
2106 # 10**-ye iff len(str(|yc|*nbits(xc)) <= -ye.
2114 # if len(str(abs(yc*xe)) <= -ye then abs(yc*xe) < 10**-ye,
2116 # Similarly, len(str(abs(yc)*xc_bits)) <= -ye implies |y|
2126 yc, ye = y.int, y.exp
2127 while yc % 10 == 0:
2128 yc //= 10
2134 xe *= yc
2193 e = _decimal_lshift_exact(e * yc, ye)
2194 xe = _decimal_lshift_exact(xe * yc, ye)
2220 e = _decimal_lshift_exact(e * yc, ye)
2221 xe = _decimal_lshift_exact(xe * yc, ye)
2238 m, n = yc*10**ye, 1
2240 if xe != 0 and len(str(abs(yc*xe))) <= -ye:
2243 if len(str(abs(yc)*xc_bits)) <= -ye:
2245 m, n = yc, 10**(-ye)
2448 yc, ye = y.int, y.exp
2450 yc = -yc
2456 coeff, exp = _dpower(xc, xe, yc, ye, p+extra)
5974 def _dpower(xc, xe, yc, ye, p):
5975 """Given integers xc, xe, yc and ye representing Decimals x = xc*10**xe and
5976 y = yc*10**ye, compute x**y. Returns a pair of integers (c, e) such that:
5990 b = len(str(abs(yc))) + ye
5995 # compute product y*log(x) = yc*lxc*10**(-p-b-1+ye) = pc*10**(-p-1)
5998 pc = lxc*yc*10**shift
6000 pc = _div_nearest(lxc*yc, 10**-shift)
6005 if ((len(str(xc)) + xe >= 1) == (yc > 0)): # if x**y > 1: