Brent cycle-finding algorithm (source code)

= Brent cycle-finding algorithm
{c}

= Brent cycle detection
{c}
{synonym}

A constant-memory <algorithm> for detecting the eventual cycle in a sequence generated by repeated <function> evaluation. It holds a checkpoint fixed while a second pointer advances, doubling the checkpoint interval when exhausted; a second pass locates the start of the cycle.