Yahoo奇摩 網頁搜尋

  1. ...加轉型,不然,標準的 C++會 不過! x0 = (-b+s) / (2*a); dig = (int) log10( fabs (x0)); // 這是你要的! cout << "x0 = " &...

  2. ...x0),2)))); printf("%2d %10.7lf n",i-1,x0); 2006-10-14 21:52:17 補充: if( fabs (x-x0) <TOL){ printf("Root=%10.7lf x-x0=%10.7lf...

  3. ...x - x_1) / (f(x) - f(x_1)) * f(x); x_1 = x; x = x - e; } while ( fabs (e) > tol && --iter); return x; } int main(void) { printf("%f...

  4. ...sin(t3-t4)); dt4 = (e1*cos(t3)+e2*sin(t3))/(r4*sin(t3-t4)); t3 += dt3; t4 += dt4; if( fabs (dt3)<e && fabs (dt4)<e ) flag = 1...

  5. ...兩者差異過小時,代表已經收斂,就不繼續算了 while( fabs ( ans1 - ans2 ) > 0.0000000001 ) { // 計算這次的結果前...

  6. 程式請參考 http://tw.knowledge.yahoo.com/question/?qid=1306061311569 別忘了將上述程式中的f(x)定義改為 double f(double x) {return exp(-k* fabs (x));}

  7. ...printf(","); } for(int a=0;a<5;a++) { c[a]= fabs (f[a]-g[a]); } for(int a=0;a<5;a++) { for(int...

  8. ...n"); if((b*b-4*a*c)<0){ //複數解 real = -b / 2*a; img = sqrt( fabs (b*b-4.0*a*c))/2*a; printf("%lf +- %lfi n",real,img); }else{ //實數解 real...

  9. ...quot;x%d = %f n",i ,xn); xn = xn - ((exp(-xn) - xn)/(-exp(-xn) - 1.0)); }while( fabs (rev-xn) > .0); return xn; } 原理看這裡,只是式子不同而已 2007-03-21 05:14...

  10. ...int main() { double x,y; int a1=13,b1=17,c1=30; int a2=23,b2=12,c2=20; x= fabs (pow(a1,2)+pow(b1,2)-pow(c1,2)); y=sqrt(pow(a2,3)+pow(b2,3))+pow(c2,3); printf...