Skip to content

Commit c14397f

Browse files
committed
chore: apply suggestions from review
--- 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: passed - task: lint_repl_help status: na - task: lint_javascript_src status: passed - 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: 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 ---
1 parent a4cbab5 commit c14397f

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

lib/node_modules/@stdlib/math/base/special/factorial2f/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020

2121
# factorial2f
2222

23-
> Evaluate the [double factorial][double-factorial] function as a single-precision floating-point number.
23+
> Evaluate the [double factorial][double-factorial] function for a single-precision floating-point number.
2424
2525
<section class="intro">
2626

lib/node_modules/@stdlib/math/base/special/factorial2f/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
'use strict';
2020

2121
/**
22-
* Evaluate the double factorial as a single-precision floating-point number.
22+
* Evaluate the double factorial function for a single-precision floating-point number.
2323
*
2424
* @module @stdlib/math/base/special/factorial2f
2525
*

lib/node_modules/@stdlib/math/base/special/factorial2f/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@stdlib/math/base/special/factorial2f",
33
"version": "0.0.0",
4-
"description": "Evaluate the double factorial as a single-precision floating-point number.",
4+
"description": "Evaluate the double factorial function for a single-precision floating-point number.",
55
"license": "Apache-2.0",
66
"author": {
77
"name": "The Stdlib Authors",

lib/node_modules/@stdlib/math/base/special/factorial2f/src/main.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
*/
3737
float stdlib_base_factorial2f( const int32_t n ) {
3838
int32_t last;
39-
int32_t v;
4039
int32_t i;
4140
float out;
4241

@@ -49,17 +48,16 @@ float stdlib_base_factorial2f( const int32_t n ) {
4948
if ( n < 0 || !stdlib_base_is_integerf( n ) ) {
5049
return 0.0f / 0.0f; // NaN
5150
}
52-
v = n;
53-
if ( v == 0 || v == 1 ) {
51+
if ( n == 0 || n == 1 ) {
5452
return 1.0f;
5553
}
56-
if ( stdlib_base_is_evenf( v ) ) {
54+
if ( stdlib_base_is_evenf( n ) ) {
5755
last = 2;
5856
} else {
5957
last = 3;
6058
}
6159
out = 1.0f;
62-
for ( i = v; i >= last; i -= 2 ) {
60+
for ( i = n; i >= last; i -= 2 ) {
6361
out *= i;
6462
}
6563
return out;

0 commit comments

Comments
 (0)