False Position Method c언어로 구현하기
#include #include #define thshold 2 * pow(10,-4) double sinfx(double x){ return (x*x - sin(x));} void false_position(double xl, double xu){ int i; double q0, q1, q,p; double num = 40; double xr2; q0 = sinfx(xl); q1 = sinfx(xu); i = 1; p = xu - q1 * (xu - xl) / (q1 - q0); q = sinfx(p); double e0=100.0; printf("%d\t%lf\t%lf\t%lf\t%lf\n", i, xl,xu,p, e0); while(1) { p = xu - q1 * (xu - xl) / (q1 - ..
더보기