File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed
lib/node_modules/@stdlib/random/base/pareto-type1/benchmark Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ bench( pkg, function benchmark( b ) {
53
53
b . end ( ) ;
54
54
} ) ;
55
55
56
- bench ( pkg + ':factory' , function benchmark ( b ) {
56
+ bench ( pkg + ':: factory' , function benchmark ( b ) {
57
57
var alpha ;
58
58
var beta ;
59
59
var rand ;
@@ -78,3 +78,29 @@ bench( pkg+':factory', function benchmark( b ) {
78
78
b . pass ( 'benchmark finished' ) ;
79
79
b . end ( ) ;
80
80
} ) ;
81
+
82
+ bench ( pkg + '::factory,arguments' , function benchmark ( b ) {
83
+ var alpha ;
84
+ var beta ;
85
+ var rand ;
86
+ var z ;
87
+ var i ;
88
+
89
+ alpha = 100.56789 ;
90
+ beta = 55.54321 ;
91
+ rand = pareto1 . factory ( ) ;
92
+
93
+ b . tic ( ) ;
94
+ for ( i = 0 ; i < b . iterations ; i ++ ) {
95
+ z = rand ( alpha , beta ) ;
96
+ if ( isnan ( z ) ) {
97
+ b . fail ( 'should not return NaN' ) ;
98
+ }
99
+ }
100
+ b . toc ( ) ;
101
+ if ( isnan ( z ) ) {
102
+ b . fail ( 'should not return NaN' ) ;
103
+ }
104
+ b . pass ( 'benchmark finished' ) ;
105
+ b . end ( ) ;
106
+ } ) ;
You can’t perform that action at this time.
0 commit comments