Skip to content

Instantly share code, notes, and snippets.

ryanspradlin / brent.js
Last active Apr 9, 2021
Javascript implementation of Brent's Method, a root-finding algorithm
View brent.js
/* @flow */
// Derived from:
// Brent's method is a hybrid root-finding algorithm that combines the
// faster/less-reliable inverse quadradic interpolation and secant methods with
// the slower/more-reliable bisection method.
export function brent(
f: (x: number) => number,
lowerBound: number,
View alldataloader.js
type BatchLoadFn<K, V> = (keys: Array<K>) => Promise<Array<V | Error>>;
type LoadAllFn<K, V> = () => Promise<Array<[K, V]>>;
type Options<K, V> = {
batch?: boolean,
cache?: boolean,
cacheMap?: CacheMap<K, Promise<V>>,
cacheKeyFn?: (key: any) => any

Keybase proof

I hereby claim:

  • I am ryanspradlin on github.
  • I am ryanspradlin ( on keybase.
  • I have a public key whose fingerprint is 1A8A CC82 73EC 6A41 CAA0 391E E457 1E77 D13D 6150

To claim this, I am signing this object:

ryanspradlin /
Created Mar 25, 2011
Finds lines present in file A that are missing in file B
grep -v -x -f $FILEB $FILEA