UNPKG

enhancedmath

Version:

This package contains some enhanced mathematical operations

11 lines (10 loc) 546 B
/** * Calculates the intersection points with the x-axis to a certain precision. The smaller the accuracy, the higher the precision. * @param a Left outer value of interval * @param b Right outer value of interval * @param accuracy How close the solution has te be to the real solution * @param f Function. e.g. 3x^3+5x^2+3x+5 * @returns the value of x where f(a) = f(b) with the given approximation */ declare const bisection: (a: number, b: number, accuracy: number, f: (c: number) => number) => number | null; export default bisection;