Locating roots of equations