Working state for Brent's root-finding method.
brent f x1 x2 xacc: attempt to find a root of a function known to
lie between x1 and x2, using Brent's method. The root will be refined
till its accuracy is +-xacc. If convergence fails, returns the final
state of the search.