added documentation for brent's method function