// by Tim Ratigan // Plots the phase for the reciprocal of the gamma function public class PhaseInvGamma implements ComplexFunction { public Complex eval(Complex z) { // \arg\frac{1}{\Gamma(z)} double gamma = .5772156649; Complex one = new Complex(1.0, 0); Complex fact = z.times(z.times(gamma).exp()); for (int i = 1; i < 10; i++) { fact = fact.times(one.plus(z.times(1.0/i))); fact = fact.times(z.times(-1.0/i).exp()); } return new Complex(fact.phase(), 0); } public static void main(String[] args) { Plot2Dez.show(new PhaseInvGamma(), 512); } }