Skip to content

Commit ca4cd66

Browse files
committed
chore: clean-up
--- 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: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - 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 3d10cb9 commit ca4cd66

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

lib/node_modules/@stdlib/stats/base/dists/exponential/mgf/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ double stdlib_base_dists_exponential_mgf( const double t, const double lambda );
204204
205205
```c
206206
#include "stdlib/stats/base/dists/exponential/mgf.h"
207-
#include "stdlib/constants/float64/eps.h"
208207
#include <stdlib.h>
209208
#include <stdio.h>
210209
@@ -220,8 +219,8 @@ int main( void ) {
220219
int i;
221220
222221
for ( i = 0; i < 25; i++ ) {
223-
lambda = random_uniform( 0.0, 100.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
224-
t = random_uniform( -1.0, 1.0 ) + lambda;
222+
t = random_uniform( -1.0, 1.0 );
223+
lambda = random_uniform( 1.1, 10.0 );
225224
y = stdlib_base_dists_exponential_mgf( t, lambda );
226225
printf( "t: %lf, λ: %lf, M_X(t;λ): %lf\n", t, lambda, y );
227226
}
@@ -240,6 +239,8 @@ int main( void ) {
240239

241240
<section class="references">
242241

242+
</section>
243+
243244
<!-- /.references -->
244245

245246
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

lib/node_modules/@stdlib/stats/base/dists/exponential/mgf/benchmark/c/benchmark.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,21 +93,21 @@ static double random_uniform( const double min, const double max ) {
9393
* @return elapsed time in seconds
9494
*/
9595
static double benchmark( void ) {
96+
double lambda[ 100 ];
9697
double elapsed;
9798
double t[ 100 ];
98-
double lambda[ 100 ];
9999
double y;
100100
double tc;
101101
int i;
102102

103103
for ( i = 0; i < 100; i++ ) {
104104
t[ i ] = random_uniform( -1.0 + STDLIB_CONSTANT_FLOAT64_EPS, 1.0 );
105-
lambda[ i ] = random_uniform( 0.1 + STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
105+
lambda[ i ] = random_uniform( 1.0 + STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
106106
}
107107

108108
tc = tic();
109109
for ( i = 0; i < ITERATIONS; i++ ) {
110-
y = stdlib_base_dists_exponential_mgf( t[ i % 100 ], lambda[ i % 100 ]);
110+
y = stdlib_base_dists_exponential_mgf( t[ i % 100 ], lambda[ i % 100 ] );
111111
if ( y != y ) {
112112
printf( "should not return NaN\n" );
113113
break;

lib/node_modules/@stdlib/stats/base/dists/exponential/mgf/examples/c/example.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
*/
1818

1919
#include "stdlib/stats/base/dists/exponential/mgf.h"
20-
#include "stdlib/constants/float64/eps.h"
2120
#include <stdlib.h>
2221
#include <stdio.h>
2322

@@ -34,7 +33,7 @@ int main( void ) {
3433

3534
for ( i = 0; i < 25; i++ ) {
3635
t = random_uniform( -1.0, 1.0 );
37-
lambda = random_uniform( 0.1, 10.0 );
36+
lambda = random_uniform( 1.1, 10.0 );
3837
y = stdlib_base_dists_exponential_mgf( t, lambda );
3938
printf( "t: %lf, λ: %lf, M_X(t;λ): %lf\n", t, lambda, y );
4039
}

lib/node_modules/@stdlib/stats/base/dists/exponential/mgf/manifest.json

-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
"libpath": [],
7474
"dependencies": [
7575
"@stdlib/math/base/assert/is-nan",
76-
"@stdlib/constants/float64/eps",
7776
"@stdlib/constants/float64/pinf"
7877
]
7978
}

lib/node_modules/@stdlib/stats/base/dists/exponential/mgf/src/addon.c

-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@
1919
#include "stdlib/stats/base/dists/exponential/mgf.h"
2020
#include "stdlib/math/base/napi/binary.h"
2121

22-
// cppcheck-suppress shadowFunction
2322
STDLIB_MATH_BASE_NAPI_MODULE_DD_D( stdlib_base_dists_exponential_mgf )

lib/node_modules/@stdlib/stats/base/dists/exponential/mgf/src/main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* @return evaluated MGF
2929
*
3030
* @example
31-
* var v = mgf( 2.0, 3.0 );
31+
* double v = mgf( 2.0, 3.0 );
3232
* // returns 3.0
3333
*/
3434
double stdlib_base_dists_exponential_mgf( const double t, const double lambda ) {

0 commit comments

Comments
 (0)