Skip to content

Instantly share code, notes, and snippets.


Richard Morey richarddmorey

  • Cardiff University
  • Cardiff, Wales
View GitHub Profile
borgar / uniroot.js
Last active Dec 12, 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
* Copyright (c) 2012 Borgar Thorsteinsson <>
* MIT License,