In numerical analysis, a numerical method is a mathematical tool designed to solve numerical problems. The implementation of a numerical method with an appropriate convergence check in a programming language is called a numerical algorithm
GNU General Public License v3.0
10
stars
1
forks
source link
ANOTHER METHOD TO SOLVE NEWGTON RHAPSON METHOD IN C++ #4
include
include
// Function to compute f(x) = x^2 - 2 double f(double x) { return x x x + x - 1 ; }
// Function to compute f'(x) = 2x double f_prime(double x) { return 3* x + 1 ; }
int main() { // Initial values double x0 = 1.0; // initial guess double epsilon = 1e-6; // tolerance int maxIter = 100; // maximum number of iterations
}