File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
lib/node_modules/@stdlib/stats/base/dists/skew-normal/pdf/lib Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 20
20
21
21
// MODULES //
22
22
23
- var normalPdf = require ( '@stdlib/stats/base/dists/normal/pdf' ) ;
24
- var normalCdf = require ( '@stdlib/stats/base/dists/normal/cdf' ) ;
23
+ var normalPDF = require ( '@stdlib/stats/base/dists/normal/pdf' ) ;
24
+ var normalCDF = require ( '@stdlib/stats/base/dists/normal/cdf' ) ;
25
25
var isnan = require ( '@stdlib/math/base/assert/is-nan' ) ;
26
26
27
27
@@ -77,15 +77,15 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
77
77
function pdf ( x , mu , sigma , alpha ) {
78
78
var pdf ;
79
79
var cdf ;
80
- pdf = normalPdf ( x , mu , sigma ) ;
80
+ if ( isnan ( alpha ) ) {
81
+ return NaN ;
82
+ }
83
+ pdf = normalPDF ( x , mu , sigma ) ;
81
84
if ( alpha === 0.0 ) {
82
85
return pdf ;
83
86
}
84
- if ( isnan ( alpha ) ) {
85
- return NaN ;
86
- }
87
- cdf = normalCdf ( alpha * x , alpha * mu , sigma ) ;
88
- return 2 * pdf * cdf ;
87
+ cdf = normalCDF ( alpha * x , alpha * mu , sigma ) ;
88
+ return 2.0 * pdf * cdf ;
89
89
}
90
90
91
91
You can’t perform that action at this time.
0 commit comments