With zero-based numbering, a range can be expressed as the half-open interval, as opposed to the closed interval, [1,"n". Empty ranges, which often occur in algorithms, are tricky to express with a closed interval without resorting to obtuse conventions like [1,0]. Because of this property, zero-based indexing potentially reduces off-by-one and fencepost errors. On the other hand, the repeat count "n" is calculated in advance, making the use of counting from 0 to "n"−1 (inclusive) less intuitive. Some authors prefer one-based indexing as it corresponds more closely to how entities are indexed in other contexts.