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 2020
2121// MODULES //
2222
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' ) ;
2525var isnan = require ( '@stdlib/math/base/assert/is-nan' ) ;
2626
2727
@@ -77,15 +77,15 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
7777function pdf ( x , mu , sigma , alpha ) {
7878 var pdf ;
7979 var cdf ;
80- pdf = normalPdf ( x , mu , sigma ) ;
80+ if ( isnan ( alpha ) ) {
81+ return NaN ;
82+ }
83+ pdf = normalPDF ( x , mu , sigma ) ;
8184 if ( alpha === 0.0 ) {
8285 return pdf ;
8386 }
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 ;
8989}
9090
9191
You can’t perform that action at this time.
0 commit comments