File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
lib/node_modules/@stdlib/stats/base/dists/rayleigh/logpdf/benchmark/c Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -95,19 +95,19 @@ static double random_uniform( const double min, const double max ) {
9595static double benchmark ( void ) {
9696 double elapsed ;
9797 double x [ 100 ];
98- double sigma ;
98+ double sigma [ 100 ] ;
9999 double y ;
100100 double t ;
101101 int i ;
102102
103- sigma = 4.0 ;
104103 for ( i = 0 ; i < 100 ; i ++ ) {
105- x [ i ] = random_uniform ( 0.0 , 25.0 );
104+ x [ i ] = random_uniform ( 20 , 20 + STDLIB_CONSTANT_FLOAT64_EPS );
105+ sigma [ i ] = random_uniform ( -100 , 0 );
106106 }
107107
108108 t = tic ();
109109 for ( i = 0 ; i < ITERATIONS ; i ++ ) {
110- y = stdlib_base_dists_rayleigh_logpdf ( x [ i % 100 ], sigma );
110+ y = stdlib_base_dists_rayleigh_logpdf ( x [ i % 100 ], sigma [ i % 100 ] );
111111 if ( y != y ) {
112112 printf ( "should not return NaN\n" );
113113 break ;
You can’t perform that action at this time.
0 commit comments