series(cos(x)^(sin(x)/x),x==0,5);
series(((a^x+b^x)/2)^(1/x),x==0,2);
Hello, I recently came across Ginac and I found it was an excellent tool. The speed of series expansion is amazing compared to my hand-held calculator. However, ginac 1.5.8 is unable to expand expressions like : cos(x)^(sin(x)/x), even if it expands well sin(x)/x. Using ginac compiled from git some days ago, ginac-git/ginsh/ginsh [...] power::eval(): division by zero power::eval(): division by zero I found out that was caused by ginac's attempt to use taylor formula in these cases (in power::series in pseries.cpp line 1129 and 1134). I give you a patch for it, that enables that kind of calculations : (in patched ginsh)
series(cos(x)^(sin(x)/x),x==0,5); 1+(-1/2)*x^2+1/8*x^4+Order(x^5) series(((a^x+b^x)/2)^(1/x),x==0,2); (exp(1/2*log(b)+1/2*log(a)))+(-1/8*exp(1/2*log(b)+1/2*log(a))*(2*log(b)*log(a)- log(a)^2-log(b)^2))*x+Order(x^2)
(or human-simplified sqrt(a*b)+(1/8*sqrt(a*b)*(log(a)-log(b))^2*x+Order(x^2) ) The exponential simplification is none of my abilities in Ginac. Bye Camille Gillot