normdist.cc

来自「Financial Recipes」· CC 代码 · 共 12 行

CC
12 行
字号
#include <cmath>     // c library of math functionsusing namespace std; // which is part of the standard namespace// most C compilers define PI, but just in case it doesn't #ifndef PI #define PI 3.141592653589793238462643#endifdouble n(double z) {  // normal distribution function        return (1.0/sqrt(2.0*PI))*exp(-0.5*z*z);};

⌨️ 快捷键说明

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