Skip to content

Commit 9977cde

Browse files
committed
refactor: modified number generation in C benchmarks
--- 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: na - 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: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: missing_dependencies - 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: na - task: run_c_benchmarks status: passed - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - 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 ba98de3 commit 9977cde

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/node_modules/@stdlib/stats/base/dists/chisquare/kurtosis/benchmark/c/benchmark.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
* limitations under the License.
1717
*/
1818

19+
#include <sys/time.h>
20+
#include "stdlib/constants/float64/eps.h"
1921
#include "stdlib/stats/base/dists/chisquare/kurtosis.h"
2022
#include <math.h>
2123
#include <stdio.h>
2224
#include <stdlib.h>
2325
#include <time.h>
24-
#include <sys/time.h>
2526

2627
#define NAME "chisquare-kurtosis"
2728
#define ITERATIONS 1000000
@@ -68,7 +69,7 @@ static double benchmark( void ) {
6869
int i;
6970

7071
for ( i = 0; i < 100; i++ ) {
71-
k[ i ] = random_uniform( 0.1, 10.0 );
72+
k[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
7273
}
7374

7475
start = tic();

lib/node_modules/@stdlib/stats/base/dists/chisquare/kurtosis/manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
"libraries": [],
5555
"libpath": [],
5656
"dependencies": [
57-
"@stdlib/math/base/assert/is-nan"
57+
"@stdlib/math/base/assert/is-nan",
58+
"@stdlib/constants/float64/eps"
5859
]
5960
},
6061
{

0 commit comments

Comments
 (0)