In this Stackoverflow anwer I dimly recall being taught that it's better to use as wide a condition as possible to terminate a loop, rather than testing for an exact termination condition.i.e. use:while (x < 10) rather thanwhile (x != 10)however I cannot recall (or find) any formal basis or rationale for this.Is this actually written down anywhere as best current practise?
Preferred form for error detection and loop termination conditions?
formal methods