Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Deterministic

A deterministic function is a function that produces the same output, based on the same input.

strlen() is a deterministic function: it always returns the length of a string the same way.

time() is not a deterministic function: it always returns a different values, as time passes. rand(), time() are non deterministic.

A function becomes non-deterministic when it relies on systems that may change between two calls. This is the case for files or database accesses.

Documentation

See Also