A square number is an integer of the form for some integer . Consecutive nonnegative squares differ by .
The square part of a positive integer is its largest square divisor, . Dividing by its square part leaves the squarefree part.
For a nonnegative integer , compute its integer square root and accept exactly when . An approximate square root must be corrected with exact integer comparisons before this equality is tested. This procedure distinguishes a squareness test from merely approximating a square root.