Skip to content

Commit 60a005f

Browse files
chore: updated range of x
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: passed - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 3157af2 commit 60a005f

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/pmf/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ int main( void ) {
226226
for ( i = 0; i < 10; i++ ) {
227227
a = stdlib_base_round( random_uniform( 0.0, 10.0 ) );
228228
b = stdlib_base_round( random_uniform( 0.0, 10.0 ) ) + a;
229-
x = stdlib_base_round( random_uniform( 0.0, 10.0 ) ) + a;
229+
x = stdlib_base_round( random_uniform( a*1.0, b*1.0 ) );
230230
y = stdlib_base_dists_discrete_uniform_logpmf( x, a, b );
231231
printf( "x:%lf, a: %d, b: %d, P(X=x;a,b): %lf\n", x, a, b, y );
232232
}

lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/pmf/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ bench( pkg, function benchmark( b ) {
4646
for ( i = 0; i < len; i++ ) {
4747
min[ i ] = round( randu()*10.0 );
4848
max[ i ] = round( randu() * 10.0 ) + min[ i ];
49-
x[ i ] = round( randu() * 10.0 ) + min[ i ];
49+
x[ i ] = round( randu() * max[ i ] ) - min[ i ];
5050
}
5151

5252
b.tic();

lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/pmf/benchmark/benchmark.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ bench( pkg+'::native', opts, function benchmark( b ) {
5555
for ( i = 0; i < len; i++ ) {
5656
min[ i ] = round( randu()*10.0 );
5757
max[ i ] = round( randu() * 10.0 ) + min[ i ];
58-
x[ i ] = round( randu() * 10.0 ) + min[ i ];
58+
x[ i ] = round( randu() * max[ i ] ) - min[ i ];
5959
}
6060

6161
b.tic();

lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/pmf/benchmark/c/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static double benchmark( void ) {
105105
for ( i = 0; i < 100; i++ ) {
106106
a[ i ] = stdlib_base_round( random_uniform( 0.0, 10.0 ) );
107107
b[ i ] = stdlib_base_round( random_uniform( 0.0, 10.0 ) ) + a[ i ];
108-
x[ i ] = stdlib_base_round( random_uniform( 0.0, 10.0 ) ) + a[ i ];
108+
x[ i ] = stdlib_base_round( random_uniform( a[ i ]*1.0, b[ i ]*1.0 ) );
109109
}
110110

111111
t = tic();

lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/pmf/examples/c/example.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int main( void ) {
3737
for ( i = 0; i < 10; i++ ) {
3838
a = stdlib_base_round( random_uniform( 0.0, 10.0 ) );
3939
b = stdlib_base_round( random_uniform( 0.0, 10.0 ) ) + a;
40-
x = stdlib_base_round( random_uniform( 0.0, 10.0 ) ) + a;
40+
x = stdlib_base_round( random_uniform( a*1.0, b*1.0 ) );
4141
y = stdlib_base_dists_discrete_uniform_pmf( x, a, b );
4242
printf( "x:%lf, a: %d, b: %d, P(X=x;a,b): %lf\n", x, a, b, y );
4343
}

0 commit comments

Comments
 (0)