Skip to content

Commit fcee177

Browse files
refactor: C implementation
1 parent 52ea241 commit fcee177

File tree

3 files changed

+5
-26
lines changed

3 files changed

+5
-26
lines changed

lib/node_modules/@stdlib/math/base/special/tribonaccif/lib/native.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,7 @@ var addon = require( './../src/addon.node' );
6161
* // returns 7
6262
*
6363
* @example
64-
* var y = tribonaccif( NaN );
65-
* // returns NaN
66-
*
67-
* @example
68-
* var y = tribonaccif( 3.14 );
69-
* // returns NaN
70-
*
71-
* @example
72-
* var y = tribonaccif( -1.0 );
64+
* var y = tribonaccif( -1 );
7365
* // returns NaN
7466
*/
7567
function tribonaccif( n ) {

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@
3737
"libpath": [],
3838
"dependencies": [
3939
"@stdlib/math/base/napi/unary",
40-
"@stdlib/constants/float32/max-safe-nth-tribonacci",
41-
"@stdlib/math/base/assert/is-nanf",
42-
"@stdlib/math/base/assert/is-integerf"
40+
"@stdlib/constants/float32/max-safe-nth-tribonacci"
4341
]
4442
},
4543
{
@@ -53,9 +51,7 @@
5351
"libraries": [],
5452
"libpath": [],
5553
"dependencies": [
56-
"@stdlib/constants/float32/max-safe-nth-tribonacci",
57-
"@stdlib/math/base/assert/is-nanf",
58-
"@stdlib/math/base/assert/is-integerf"
54+
"@stdlib/constants/float32/max-safe-nth-tribonacci"
5955
]
6056
},
6157
{
@@ -69,9 +65,7 @@
6965
"libraries": [],
7066
"libpath": [],
7167
"dependencies": [
72-
"@stdlib/constants/float32/max-safe-nth-tribonacci",
73-
"@stdlib/math/base/assert/is-nanf",
74-
"@stdlib/math/base/assert/is-integerf"
68+
"@stdlib/constants/float32/max-safe-nth-tribonacci"
7569
]
7670
}
7771
]

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
#include "stdlib/math/base/special/tribonaccif.h"
2020
#include "stdlib/constants/float32/max_safe_nth_tribonacci.h"
21-
#include "stdlib/math/base/assert/is_nanf.h"
22-
#include "stdlib/math/base/assert/is_integerf.h"
2321

2422
static const int32_t tribonaccif_value[ 31 ] = {
2523
0,
@@ -66,12 +64,7 @@ static const int32_t tribonaccif_value[ 31 ] = {
6664
* // returns 0
6765
*/
6866
float stdlib_base_tribonaccif( const int32_t n ) {
69-
if (
70-
stdlib_base_is_nanf( n ) ||
71-
stdlib_base_is_integerf( n ) == false ||
72-
n < 0 ||
73-
n > STDLIB_CONSTANT_FLOAT32_MAX_SAFE_NTH_TRIBONACCI
74-
) {
67+
if ( n < 0 || n > STDLIB_CONSTANT_FLOAT32_MAX_SAFE_NTH_TRIBONACCI ) {
7568
return 0.0 / 0.0; // NaN
7669
}
7770
return tribonaccif_value[ n ];

0 commit comments

Comments
 (0)