from sympy.series.order import Order
nu, z = self.args
if z.limit(x, 0) is S.Zero:
s = [(-1)**k * z**(2 * k) / (factorial(k) * factorial(nu + k)
* 2**(2 * k)) for k in range((n + 1)//2)] + [Order(z**(n))]
return ((z / 2)**nu * Add(*s)).expand()
After Change
// In case of powers less than 1, number of terms need to be computed
// separately to avoid repeated callings of _eval_nseries with wrong n
try:
_, exp = z.leadterm(x)
except (ValueError, NotImplementedError):
return self