Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap


You are here: irt.org | FOLDOC | iteration

<programming> Repetition of a sequence of instructions. A fundamental part of many algorithms. Iteration is characterised by a set of initial conditions, an iterative step and a termination condition.

A well known example of iteration in mathematics is Newton-Raphson iteration. Iteration in programs is expressed using a loop, e.g. in C:

	new_x = n/2;
	  x = new_x;
	  new_x = 0.5 * (x + n/x);
	} while (abs(new_x-x) > epsilon);

Iteration can be expressed in functional languages using recursion:

	solve x n = if abs(new_x-x) > epsilon
		    then solve new_x n
		    else new_x
		    where new_x = 0.5 * (x + n/x)

        solve n/2 n


Nearby terms: it « ITAR « Iterated Function System « iteration » iterative deepening » iterator » Iternet

FOLDOC, Topics, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, ?, ALL

©2018 Martin Webb