Skip to content

Commit 5f81198

Browse files
committed
fix: update parameter handling due to int32 type
--- 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: 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 8dfe021 commit 5f81198

File tree

2 files changed

+2
-31
lines changed

2 files changed

+2
-31
lines changed

lib/node_modules/@stdlib/math/base/special/nonfibonaccif/manifest.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@
3838
"dependencies": [
3939
"@stdlib/math/base/napi/unary",
4040
"@stdlib/constants/float32/nan",
41-
"@stdlib/constants/float32/phi",
42-
"@stdlib/constants/float32/pinf",
43-
"@stdlib/math/base/assert/is-integerf",
44-
"@stdlib/math/base/assert/is-nanf",
4541
"@stdlib/math/base/special/floorf",
4642
"@stdlib/math/base/special/lnf"
4743
]
@@ -58,10 +54,6 @@
5854
"libpath": [],
5955
"dependencies": [
6056
"@stdlib/constants/float32/nan",
61-
"@stdlib/constants/float32/phi",
62-
"@stdlib/constants/float32/pinf",
63-
"@stdlib/math/base/assert/is-integerf",
64-
"@stdlib/math/base/assert/is-nanf",
6557
"@stdlib/math/base/special/floorf",
6658
"@stdlib/math/base/special/lnf"
6759
]
@@ -78,10 +70,6 @@
7870
"libpath": [],
7971
"dependencies": [
8072
"@stdlib/constants/float32/nan",
81-
"@stdlib/constants/float32/phi",
82-
"@stdlib/constants/float32/pinf",
83-
"@stdlib/math/base/assert/is-integerf",
84-
"@stdlib/math/base/assert/is-nanf",
8573
"@stdlib/math/base/special/floorf",
8674
"@stdlib/math/base/special/lnf"
8775
]

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

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818

1919
#include "stdlib/math/base/special/nonfibonaccif.h"
2020
#include "stdlib/constants/float32/nan.h"
21-
#include "stdlib/constants/float32/phi.h"
22-
#include "stdlib/constants/float32/pinf.h"
23-
#include "stdlib/math/base/assert/is_integerf.h"
24-
#include "stdlib/math/base/assert/is_nanf.h"
2521
#include "stdlib/math/base/special/floorf.h"
2622
#include "stdlib/math/base/special/lnf.h"
2723
#include <stdint.h>
@@ -32,7 +28,7 @@ static const float LN_PHI = 0.48121182506f;
3228
/**
3329
* Computes the nth non-Fibonacci single-precision floating-point number.
3430
*
35-
* @param x input value
31+
* @param n input value
3632
* @return output value
3733
*
3834
* @example
@@ -48,14 +44,6 @@ static const float LN_PHI = 0.48121182506f;
4844
* // returns 7.0f
4945
*
5046
* @example
51-
* float y = stdlib_base_nonfibonaccif( NaN );
52-
* // returns NaN
53-
*
54-
* @example
55-
* float y = stdlib_base_nonfibonaccif( 3.14f );
56-
* // returns NaN
57-
*
58-
* @example
5947
* float y = stdlib_base_nonfibonaccif( -1 );
6048
* // returns NaN
6149
*/
@@ -64,12 +52,7 @@ float stdlib_base_nonfibonaccif( const int32_t n ) {
6452
float a;
6553
float b;
6654

67-
if (
68-
stdlib_base_is_nanf( n ) ||
69-
!stdlib_base_is_integerf( n ) ||
70-
n < 1.0f ||
71-
n == STDLIB_CONSTANT_FLOAT32_PINF
72-
) {
55+
if ( n < 1 ) {
7356
return STDLIB_CONSTANT_FLOAT32_NAN;
7457
}
7558
m = n + 1;

0 commit comments

Comments
 (0)