Skip to content

Commit 004d18c

Browse files
committed
refactor: reorganise unused variables in main.c
--- 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: missing_dependencies - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - 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: na - 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 263cdaf commit 004d18c

File tree

1 file changed

+2
-8
lines changed
  • lib/node_modules/@stdlib/stats/base/dists/triangular/mgf/src

1 file changed

+2
-8
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,16 @@ double stdlib_base_dists_triangular_mgf( const double t, const double a, const d
5555
if ( t == 0.0 ) {
5656
return 1.0;
5757
}
58-
59-
double term1 = 0.0;
60-
double term2 = 0.0;
61-
6258
if ( a < c ) {
6359
if ( c < b ) {
64-
term1 = ( c - a ) * phi2( ( a - c ) * t );
65-
term2 = ( b - c ) * phi2( ( b - c ) * t );
60+
double term1 = ( c - a ) * phi2( ( a - c ) * t );
61+
double term2 = ( b - c ) * phi2( ( b - c ) * t );
6662
return stdlib_base_exp( c * t ) * ( term1 + term2 ) / ( b - a );
6763
}
6864
return stdlib_base_exp( c * t ) * phi2( ( a - c ) * t );
6965
}
70-
7166
if ( c < b ) {
7267
return stdlib_base_exp( c * t ) * phi2( ( b - c ) * t );
7368
}
74-
7569
return stdlib_base_exp( c * t );
7670
}

0 commit comments

Comments
 (0)