⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_b001.cpp

📁 非常著名的曲线拟合程序
💻 CPP
字号:
#include <iostream>#include <math.h>#include <specfns.h>using namespace std;/*  Tests values of normal cdf, based on some randomly-selected  table entries from Abramowitz & Setgun.*/boolapprox(double x, double y){  return fabs(x-y) < 5e-4;}int main(){  if (  approx(normal_cdf( 0      ),   0.500) &&	approx(normal_cdf( 0.10295),   0.541) &&	approx(normal_cdf(-0.10295), 1-0.541) &&	approx(normal_cdf( 1.02365),   0.847) &&	approx(normal_cdf(-1.02365), 1-0.847) &&	approx(normal_cdf( 0.38262),   0.649) &&	approx(normal_cdf(-0.38262), 1-0.649)  )    cout << "ok" << endl;  else    cout << "failed" << endl;    return 0;  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -