摘要: 补一下一些小盲区,譬如simpson这种数值积分的方法虽然一直知道,但是从未实现过,做一道例题存一个模板。#pragma warning(disable:4996)#include#include#include#include#include#includeusing namespace std;double a, b, l, r;double sqr(double x){ return x*x;}double f(double x){ return b / a*sqrt(sqr(a) - sqr(x));}double simpson(double l, double r){ return 阅读全文
posted @ 2014-04-11 21:42 chanme 阅读(200) 评论(0) 推荐(0) 编辑