differentiation by llhuii

import re;a=re.sub
while 1:print(a('\^1|[-+x]+\d*$','',a('(\d+)x\^((.))',lambda m:eval('str(%s*%s)+"x^"+str(~-%s)'%m.groups()),input())))

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page