// by Tim Ratigan // Plots the magnitude of the inverse Gamma function. public class AbsInvGamma implements ComplexFunction { public Complex eval(Complex z) { // \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 fact; } public static void main(String[] args) { Plot2Dez.show(new AbsInvGamma(), 512); } }