討論串[問題] 請問C++的多項式運算
共 4 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓3(3推 0噓 0→)留言3則,0人參與, 最新作者granzi (烏木)時間18年前 (2007/09/23 20:05), 編輯資訊
0
0
1
內容預覽:
GSL(GNU Scientific Library)似乎是一個更好的選擇:. 如果要用C的話:. #include <stdio.h>. #include <gsl/gsl_poly.h>. int main(int argc, char **argv) {. double iter = 0.99
(還有230個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者granzi (烏木)時間18年前 (2007/09/23 19:32), 編輯資訊
0
0
1
內容預覽:
對不起,我沒注意到你要的是C++. 把include 改成. #include <cmath>. #include <iostream>. using namespace std;. 然後main的部份改成. int main(int argc, char **argv) {. double sum
(還有339個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者granzi (烏木)時間18年前 (2007/09/23 19:23), 編輯資訊
0
0
0
內容預覽:
#include <math.h>. #include <stdio.h>. double polyn(double x) {. double funValue = 0.0;. funValue = pow(x, 6.0) - 6.0*pow(x, 5.0) + 15.0*pow(x, 4.0) -
(還有369個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者bens1 (藍星)時間18年前 (2007/09/23 19:06), 編輯資訊
0
0
0
內容預覽:
題目 多項式ꄠ x^6-6x^5+15x^4-20x^3+15x^2-6x+1. x=0.99到1.01 每次間隔0.001. 不知道在C中如何寫出多項式函式. 還有x=0.99到1.01中. 應該用哪個迴圈. 我是C程式新手. 請各位高手解答. 謝謝. --. 發信站: 批踢踢實業坊(ptt.
首頁
上一頁
1
下一頁
尾頁