// begin of file mandel_d1.d /* DMD: dmd -inline -release -O mandel_d1.d GCD: gdc -O3 --fast-math -inline -lgphobos --expensive-optimizations mandel_d1.d */ import std.stdio; int main() { cdouble a, b, c, z; double mand_re = 0, mand_im = 0; for (double y = -2; y < 2; y += 0.01) { for (double x = -2; x < 2; x += 0.01) { z = (x + mand_re) + (y + mand_im) * 1i; c = z; for (int i = 0; i < 10000; i++) { z = z * z + c; if(z.re * z.re + z.im * z.im > 4.0) { break; } } } } return 0; } // end of file mandel_d1.d