number
| Promise.<number>
dichotomy(f, [a], [b]) ⇒ dichotomy.js
Dichotomy algorithm:
given a function f : x -> f(x)
and two numbers a, b
find y such that a < y < b and f(y) = 0
Kind: global function
Returns: number
| Promise.<number>
- y, such that f(y) == 0
Param | Type | Default | Description |
---|---|---|---|
f | function |
a function that takes a number and returns a number or a Promise | |
[a] | Number |
-Number.MAX_VALUE |
Start of the search interval |
[b] | Number |
Number.MAX_VALUE |
End of the search interval |
Example
== Math == Promise