Skip to content

Instantly share code, notes, and snippets.

Avatar

Richard Morey richarddmorey

View GitHub Profile
@borgar
borgar / uniroot.js
Last active Sep 11, 2020
JavaScript port of Brent's method
View uniroot.js
/**
* Searches the interval from <tt>lowerLimit</tt> to <tt>upperLimit</tt>
* for a root (i.e., zero) of the function <tt>func</tt> with respect to
* its first argument using Brent's method root-finding algorithm.
*
* Translated from zeroin.c in http://www.netlib.org/c/brent.shar.
*
* Copyright (c) 2012 Borgar Thorsteinsson <borgar@borgar.net>
* MIT License, http://www.opensource.org/licenses/mit-license.php
*
You can’t perform that action at this time.