File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed
lib/node_modules/@stdlib/random/base/rayleigh/benchmark Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ bench( pkg, function benchmark( b ) {
51
51
b . end ( ) ;
52
52
} ) ;
53
53
54
- bench ( pkg + ':factory' , function benchmark ( b ) {
54
+ bench ( pkg + ':: factory' , function benchmark ( b ) {
55
55
var sigma ;
56
56
var rand ;
57
57
var z ;
@@ -74,3 +74,27 @@ bench( pkg+':factory', function benchmark( b ) {
74
74
b . pass ( 'benchmark finished' ) ;
75
75
b . end ( ) ;
76
76
} ) ;
77
+
78
+ bench ( pkg + '::factory,arguments' , function benchmark ( b ) {
79
+ var sigma ;
80
+ var rand ;
81
+ var z ;
82
+ var i ;
83
+
84
+ sigma = 10.0 ;
85
+ rand = rayleigh . factory ( ) ;
86
+
87
+ b . tic ( ) ;
88
+ for ( i = 0 ; i < b . iterations ; i ++ ) {
89
+ z = rand ( sigma ) ;
90
+ if ( isnan ( z ) ) {
91
+ b . fail ( 'should not return NaN' ) ;
92
+ }
93
+ }
94
+ b . toc ( ) ;
95
+ if ( isnan ( z ) ) {
96
+ b . fail ( 'should not return NaN' ) ;
97
+ }
98
+ b . pass ( 'benchmark finished' ) ;
99
+ b . end ( ) ;
100
+ } ) ;
You can’t perform that action at this time.
0 commit comments