Lookback/Common.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 100% 1 / 1 totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
dnorm
1.0
CRAP 1.0
« Lookback/Greeks/Delta.pm ↑ Summary
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;
« Lookback/Greeks/Delta.pm ↑ Summary