Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 735 Bytes

README.md

File metadata and controls

44 lines (27 loc) · 735 Bytes

brent-search

Brent's method for univariate function optimization.

Example

from brent_search import brent

def func(x, s):
  return (x - s)**2 - 0.8

r = brent(lambda x: func(x, 0), -10, 10)
print(r)

The output should be

(0.0, -0.8, 6)

Install

From command line, enter

pip install brent-search

Authors

Acknowledgements

License

This project is licensed under the MIT License.