#The following function has three poles (exp(1i*pi), exp(1i*pi/3) and exp(5i*pi/3)).
# exp(1i*pi) is a pole on the branch cut thus the other function "disc.integrate"
# should not be used.
residue(function(z){log(z)/(1+z^3)},exp(1i*pi))
Run the code above in your browser using DataLab