Skip to content

Commit 0bccf37

Browse files
committed
fix: use isNegativeIntegerf
--- 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: 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 193578b commit 0bccf37

File tree

2 files changed

+4
-7
lines changed
  • lib/node_modules/@stdlib/math/base/special/factoriallnf

2 files changed

+4
-7
lines changed

lib/node_modules/@stdlib/math/base/special/factoriallnf/lib/main.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
// MODULES //
2222

23-
var isNegativeInteger = require( '@stdlib/math/base/assert/is-negative-integer' );
23+
var isNegativeIntegerf = require( '@stdlib/math/base/assert/is-negative-integerf' );
2424
var absgammalnf = require( '@stdlib/math/base/special/absgammalnf' );
2525
var f32 = require( '@stdlib/number/float64/base/to-float32' );
2626

@@ -60,9 +60,7 @@ var ONE = f32( 1.0 );
6060
*/
6161
function factoriallnf( x ) {
6262
x = f32( x );
63-
64-
// TODO: Replace with `isNegativeIntegerf` when available:
65-
if ( isNegativeInteger( x ) ) {
63+
if ( isNegativeIntegerf( x ) ) {
6664
return NaN;
6765
}
6866
return absgammalnf( f32( x + ONE ) );

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
#include "stdlib/math/base/special/factoriallnf.h"
20-
#include "stdlib/math/base/assert/is_negative_integer.h"
20+
#include "stdlib/math/base/assert/is_negative_integerf.h"
2121
#include "stdlib/math/base/special/absgammalnf.h"
2222

2323
/**
@@ -31,8 +31,7 @@
3131
* // returns ~1.792f
3232
*/
3333
float stdlib_base_factoriallnf( const float x ) {
34-
// TODO: replace with `stdlib_base_is_negative_integerf` when available:
35-
if ( stdlib_base_is_negative_integer( (double)x ) ) {
34+
if ( stdlib_base_is_negative_integerf( x ) ) {
3635
return 0.0f / 0.0f; // NaN
3736
}
3837
return stdlib_base_absgammalnf( x + 1.0f );

0 commit comments

Comments
 (0)