Rs
Module 10Normals & Black-ScholesLesson 1 of 722 min

Normal PDF & CDF

Abramowitz-Stegun style CDF approx and PDF.

Why

Black-Scholes needs N(x)=Φ(x).

PDF

n(x)=1/sqrt(2π) exp(-x²/2)

CDF approx

Rational approximation good to ~1e-5 for teaching.

Checks

Φ(0)=0.5; Φ(1.96)≈0.975

Challenge

Print a small table x from -3 to 3 step 1.

Tips
  • Handle negative x
  • Teaching precision OK
  • Special crates offline

Try it live

Normal PDF & CDFRust 2021
Loading editor…
Output
Press Run to compile and execute.