File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
lib/node_modules/@stdlib/stats/base/dists/levy/logcdf/benchmark Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,14 @@ bench( pkg, function benchmark( b ) {
44
44
scale = new Float64Array ( len ) ;
45
45
x = new Float64Array ( len ) ;
46
46
for ( i = 0 ; i < len ; i ++ ) {
47
- x [ i ] = uniform ( EPS , 100.0 ) ;
48
47
mu [ i ] = uniform ( - 50.0 , 100.0 ) ;
48
+ x [ i ] = uniform ( mu [ i ] , 100.0 ) ;
49
49
scale [ i ] = uniform ( EPS , 20.0 ) ;
50
50
}
51
51
52
52
b . tic ( ) ;
53
53
for ( i = 0 ; i < b . iterations ; i ++ ) {
54
- y = logcdf ( x , mu , scale ) ;
54
+ y = logcdf ( x [ i % len ] , mu [ i % len ] , scale [ i % len ] ) ;
55
55
if ( isnan ( y ) ) {
56
56
b . fail ( 'should not return NaN' ) ;
57
57
}
@@ -74,10 +74,10 @@ bench( pkg+':factory', function benchmark( b ) {
74
74
var i ;
75
75
76
76
mu = 0.0 ;
77
- scale = 1.5 ;
78
77
len = 100 ;
79
- x = new Float64Array ( len ) ;
78
+ scale = 1.5 ;
80
79
mylogcdf = logcdf . factory ( mu , scale ) ;
80
+ x = new Float64Array ( len ) ;
81
81
for ( i = 0 ; i < len ; i ++ ) {
82
82
x [ i ] = uniform ( 0.0 , 4.0 ) ;
83
83
}
You can’t perform that action at this time.
0 commit comments