Skip to content

Commit 3435706

Browse files
chore: completed the code review task
--- 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: passed - task: lint_c_examples status: na - 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 --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: passed - task: run_c_benchmarks status: passed - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: passed - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent 017fb67 commit 3435706

File tree

6 files changed

+5
-10
lines changed

6 files changed

+5
-10
lines changed

lib/node_modules/@stdlib/stats/base/dists/geometric/quantile/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ for ( i = 0; i < 10; i++ ) {
173173

174174
#### stdlib_base_dists_geometric_quantile( p, p_success )
175175

176-
Evaluates the quantile function of a geometric distribution.
176+
Evaluates the [quantile function][quantile-function] for a [geometric][geometric-distribution] distribution with success probability `p` at a value `r`.
177177

178178
```c
179179
double out = stdlib_base_dists_geometric_quantile( 0.5, 0.4 );

lib/node_modules/@stdlib/stats/base/dists/geometric/quantile/benchmark/benchmark.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ var bench = require( '@stdlib/bench' );
2424
var Float64Array = require( '@stdlib/array/float64' );
2525
var randu = require( '@stdlib/random/base/randu' );
2626
var isnan = require( '@stdlib/math/base/assert/is-nan' );
27-
var EPS = require( '@stdlib/constants/float64/eps' );
2827
var pkg = require( './../package.json' ).name;
2928
var quantile = require( './../lib' );
3029

@@ -42,7 +41,7 @@ bench( pkg, function benchmark( b ) {
4241
p = new Float64Array( len );
4342
r = new Float64Array( len );
4443
for ( i = 0; i < len; i++ ) {
45-
p[ i ] = ( randu() * 1.0 ) + EPS;
44+
p[ i ] = ( randu() * 1.0 );
4645
r[ i ] = randu();
4746
}
4847

lib/node_modules/@stdlib/stats/base/dists/geometric/quantile/benchmark/benchmark.native.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ var Float64Array = require( '@stdlib/array/float64' );
2626
var tryRequire = require( '@stdlib/utils/try-require' );
2727
var randu = require( '@stdlib/random/base/randu' );
2828
var isnan = require( '@stdlib/math/base/assert/is-nan' );
29-
var EPS = require( '@stdlib/constants/float64/eps' );
3029
var pkg = require( './../package.json' ).name;
3130

3231

@@ -51,7 +50,7 @@ bench( pkg+'::native', opts, function benchmark( b ) {
5150
p = new Float64Array( len );
5251
r = new Float64Array( len );
5352
for ( i = 0; i < len; i++ ) {
54-
p[ i ] = ( randu() * 1.0 ) + EPS;
53+
p[ i ] = ( randu() * 1.0 );
5554
r[ i ] = randu();
5655
}
5756

lib/node_modules/@stdlib/stats/base/dists/geometric/quantile/benchmark/c/benchmark.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
*/
1818

1919
#include "stdlib/stats/base/dists/geometric/quantile.h"
20-
#include "stdlib/constants/float64/eps.h"
2120
#include <stdlib.h>
2221
#include <stdio.h>
2322
#include <math.h>
@@ -100,7 +99,7 @@ static double benchmark( void ) {
10099
int i;
101100

102101
for ( i = 0; i < 100; i++ ) {
103-
p[ i ] = random_uniform( 0.0, 1.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
102+
p[ i ] = random_uniform( 0.0, 1.0 );
104103
}
105104

106105
t = tic();

lib/node_modules/@stdlib/stats/base/dists/geometric/quantile/manifest.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"libpath": [],
5858
"dependencies": [
5959
"@stdlib/math/base/assert/is-nan",
60-
"@stdlib/constants/float64/eps",
6160
"@stdlib/constants/float64/pinf",
6261
"@stdlib/math/base/special/ln"
6362
]

lib/node_modules/@stdlib/stats/base/dists/geometric/quantile/src/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "stdlib/math/base/assert/is_nan.h"
2121
#include "stdlib/constants/float64/pinf.h"
2222
#include "stdlib/math/base/special/ln.h"
23-
#include <math.h>
2423

2524
/**
2625
* Evaluates the quantile function of a geometric distribution.
@@ -42,7 +41,7 @@ double stdlib_base_dists_geometric_quantile( const double r, const double p ) {
4241
r <= 0.0 ||
4342
r > 1.0
4443
) {
45-
return 0.0 / 0.0;
44+
return 0.0 / 0.0; // NaN
4645
}
4746
if( r == 1.0 ){
4847
return STDLIB_CONSTANT_FLOAT64_PINF;

0 commit comments

Comments
 (0)