Integer-valued function (source code)

= Integer-valued function

= Integer-valued
{synonym}

An <integer-valued function> is a <function> whose values all lie in $\mathbb Z$, even if its input <domain> is not discrete. For example, the <floor function> $x\mapsto\lfloor x\rfloor$ maps $\mathbb R$ to $\mathbb Z$, while the <prime-counting function> assigns an <integer> to every real bound.

A <polynomial> can be integer-valued on <integers> without having <integer> coefficients: $x(x-1)/2$ takes <integer> values for every $x\in\mathbb Z$. Its behavior is specified by both its formula and its input <domain>. On a connected topological <SPACE>, a continuous integer-valued function is constant, because distinct <integer> values are separated by open gaps.