We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e053444 commit edee137Copy full SHA for edee137
lib/node_modules/@stdlib/math/base/special/fibonacci/src/main.c
@@ -20,6 +20,7 @@
20
#include "stdlib/constants/float64/max_safe_nth_fibonacci.h"
21
#include "stdlib/math/base/assert/is_nonnegative_integer.h"
22
#include <stdint.h>
23
+#include <stdlib.h>
24
25
static const int64_t fibonacci_value[ 79 ] = {
26
0,
@@ -117,5 +118,5 @@ double stdlib_base_fibonacci( const double n ) {
117
118
if ( !stdlib_base_is_nonnegative_integer( n ) || n > STDLIB_CONSTANT_FLOAT64_MAX_SAFE_NTH_FIBONACCI ) {
119
return 0.0 / 0.0; // NaN
120
}
- return fibonacci_value[ (int8_t)n ];
121
+ return fibonacci_value[ (size_t)n ];
122
0 commit comments