# Misiurewicz Point (“Naive”)

See Preperiodic Mandelbrot set Newton basins (2013).

A preperiodic Misiurewicz point \(c\) of preperiod \(q\) and period \(p\) satisfies:

\[ F^{q+p}(0, c) = F^{q}(0, c) \]

A naive implementation of Newton’s root finding method iterations for a Misiurewicz point takes the form:

\[ c_{m+1} = c_m - \frac{F^{q+p}(0, c_{m}) - F^{q}(0, c_{m})}{\frac{\partial}{\partial c}F^{q+p}(0, c_m) - \frac{\partial}{\partial c}F^{q}(0, c_m)} \]

# 1 C99 Code

#include <complex.h>

double _Complex m_misiurewicz_naive
    (double _Complex c0, int q, int p, int n)
{
    double _Complex c = c0;
    for (int m = 0; m < n; ++m)
    {
        double _Complex z = 0;
        double _Complex dc = 0;
        double _Complex zp = 0;
        double _Complex dcp = 0;
        for (int i = 0; i < q + p; ++i)
        {
            if (i == q)
            {
                zp = z;
                dcp = dc;
            }
            dc = 2 * z * dc + 1;
            z = z * z + c;
        }
        c = c - (z - zp) / (dc - dcp);
    }
    return c;
}