#include #include /* x^3-4x^2+3x+2=0 の 2.1 と 3.0 の間ある解の数値計算 期待される答: 1+2^0.5〜2.414213562373095 gcc -o root.exe root.c でコンパイル */ #define LEFT 2.1 #define RIGHT 3.0 #define N 20 /* 精度 */ extern double f(double x); main() { double a,b,c, fa, fb, fc; int i; a=LEFT; b=RIGHT; for(i=0;i