| 1 | package Math::Business::Lookback::Common; | ||
| 2 | |||
| 3 | 6 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 6 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 6 | our $VERSION = '0.01'; ## VERSION | |
| 7 | |||
| 8 | =head2 dnorm | ||
| 9 | |||
| 10 | Standard normal density function | ||
| 11 | |||
| 12 | =cut | ||
| 13 | |||
| 14 | 8 | ▶ | sub dnorm { # Standard normal density function |
|
Subroutine
dnorm: called CC=1 SCAR=0.0
Pod
documented
| |||
| 15 | 8 | my $x = shift; | |
| 16 | 8 | my $pi = 3.14159265359; | |
| 17 | |||
| 18 | 8 | my $value = exp(-$x**2 / 2) / sqrt(2.0 * $pi); | |
| 19 | |||
| 20 | 8 | return $value; | |
| 21 | } | ||
| 22 | |||
| 23 | 6 | 1; | |