function DannyMethodTester(iterations, polys, n)
    timesNewtons = zeros(1, iterations);
    calcsNewtons = zeros(1, iterations);
    timesSteffensen = zeros(1, iterations);
    calcsSteffensen = zeros(1, iterations);
    timesSeededSecant = zeros(1, iterations);
    calcsSeededSecant = zeros(1, iterations);
    timesMullers = zeros(1, iterations);
    calcsMullers = zeros(1, iterations);
    toleranceCount = zeros(1, iterations);
    failuresNewtons = zeros(1, iterations);
    failuresSteffensen = zeros(1, iterations);
    failuresSeededSecant = zeros(1, iterations);
    failuresMullers = zeros(1, iterations);

    randomStart = zeros(1, numel(polys));
    for i = 1:numel(polys)
        randomStart(i) = randi([-100, 100]);
    end

    for j = 1:iterations
        % Calculate tolerance based on the step size
        step_size = 10^(1/4); % 10/4 magnitude change
        tolerance = 1 / (10^(j/4) * step_size^(j-1));
        toleranceCount(j) = tolerance;
        avgtimeNewtons = 0;
        avgcalcsNewtons = 0;
        avgtimeSteffensen = 0;
        avgcalcsSteffensen = 0;
        avgtimeSeededSecant = 0;
        avgcalcsSeededSecant = 0;
        avgtimeMullers = 0;
        avgcalcsMullers = 0;
        failuresNewtons(j) = 0;
        failuresSteffensen(j) = 0;
        failuresSeededSecant(j) = 0;
        failuresMullers(j) = 0;

        for i = 1:numel(polys)
            f = polys{i};
            randint = randomStart(i);

            % Newton's method
            [a, b, c] = newtons(f, randint, tolerance, n);
            if ~isnan(a)
                avgtimeNewtons = avgtimeNewtons + b;
                avgcalcsNewtons = avgcalcsNewtons + c;
            else
                failuresNewtons(j) = failuresNewtons(j) + 1;
            end

            % Steffensen's method
            [a, b, c] = steffensen(f, randint, tolerance, n);
            if ~isnan(a)
                avgtimeSteffensen = avgtimeSteffensen + b;
                avgcalcsSteffensen = avgcalcsSteffensen + c;
            else
                failuresSteffensen(j) = failuresSteffensen(j) + 1;
            end

            % Seeded Secant method
            [a, b, c] = seededSecant(f, randint, randint + 1, tolerance, n);
            if ~isnan(a)
                avgtimeSeededSecant = avgtimeSeededSecant + b;
                avgcalcsSeededSecant = avgcalcsSeededSecant + c;
            else
                failuresSeededSecant(j) = failuresSeededSecant(j) + 1;
            end

            % Muller's method
            [a, b, c] = mullers(f, randint, randint + 1, randint + 2, tolerance, n);
            if ~isnan(a)
                avgtimeMullers = avgtimeMullers + b;
                avgcalcsMullers = avgcalcsMullers + c;
            else
                failuresMullers(j) = failuresMullers(j) + 1;
            end
        end

        % Compute averages, taking failures into account
        num_tests = numel(polys);
        timesNewtons(j) = avgtimeNewtons / (num_tests - failuresNewtons(j));
        calcsNewtons(j) = avgcalcsNewtons / (num_tests - failuresNewtons(j));
        timesSteffensen(j) = avgtimeSteffensen / (num_tests - failuresSteffensen(j));
        calcsSteffensen(j) = avgcalcsSteffensen / (num_tests - failuresSteffensen(j));
        timesSeededSecant(j) = avgtimeSeededSecant / (num_tests - failuresSeededSecant(j));
        calcsSeededSecant(j) = avgcalcsSeededSecant / (num_tests - failuresSeededSecant(j));
        timesMullers(j) = avgtimeMullers / (num_tests - failuresMullers(j));
        calcsMullers(j) = avgcalcsMullers / (num_tests - failuresMullers(j));
    end

    % Plotting
    figure;

    % Plot for time vs. tolerance
    subplot(2,1,1);
    semilogx(toleranceCount, timesNewtons, '-o', 'DisplayName', 'Newtons');
    hold on;
    semilogx(toleranceCount, timesSteffensen, '-s', 'DisplayName', 'Steffensen');
    semilogx(toleranceCount, timesSeededSecant, '-^', 'DisplayName', 'Seeded Secant');
    semilogx(toleranceCount, timesMullers, '-d', 'DisplayName', 'Mullers');
    hold off;
    title('Time vs. Tolerance');
    xlabel('Tolerance');
    ylabel('Time');
    legend('Location', 'best');
    xlim([min(toleranceCount) max(toleranceCount)]); % Set x-axis limits

    % Plot for calculations vs. tolerance
    subplot(2,1,2);
    semilogx(toleranceCount, calcsNewtons, '-o', 'DisplayName', 'Newtons');
    hold on;
    semilogx(toleranceCount, calcsSteffensen, '-s', 'DisplayName', 'Steffensen');
    semilogx(toleranceCount, calcsSeededSecant, '-^', 'DisplayName', 'Seeded Secant');
    semilogx(toleranceCount, calcsMullers, '-d', 'DisplayName', 'Mullers');
    hold off;
    title('Calculations vs. Tolerance');
    xlabel('Tolerance');
    ylabel('Calculations');
    legend('Location', 'best');
    xlim([min(toleranceCount) max(toleranceCount)]); % Set x-axis limits

    % Plot failure percentages
    figure;
    semilogx(toleranceCount, failuresNewtons ./ numel(polys) * 100, '-o', 'DisplayName', 'Newtons');
    hold on;
    semilogx(toleranceCount, failuresSteffensen ./ numel(polys) * 100, '-s', 'DisplayName', 'Steffensen');
    semilogx(toleranceCount, failuresSeededSecant ./ numel(polys) * 100, '-^', 'DisplayName', 'Seeded Secant');
    semilogx(toleranceCount, failuresMullers ./ numel(polys) * 100, '-d', 'DisplayName', 'Mullers');
    hold off;
    title('Failure Percentage vs. Tolerance');
    xlabel('Tolerance');
    ylabel('Failure Percentage (%)');
    legend('Location', 'best');
    xlim([min(toleranceCount) max(toleranceCount)]); % Set x-axis limits
end
