File tree Expand file tree Collapse file tree 4 files changed +6
-7
lines changed
lib/node_modules/@stdlib/math/base/special/nonfibonaccif Expand file tree Collapse file tree 4 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ var LN_PHI = lnf( PHI );
3737// MAIN //
3838
3939/**
40- * Computes the nth non-Fibonacci number.
40+ * Computes the nth non-Fibonacci number in single-precision floating-point format .
4141*
4242* ## References
4343*
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ var addon = require( './../src/addon.node' );
2727// MAIN //
2828
2929/**
30- * Computes the nth non-Fibonacci number.
30+ * Computes the nth non-Fibonacci number in single-precision floating-point format .
3131*
3232* ## References
3333*
Original file line number Diff line number Diff line change @@ -67,4 +67,4 @@ clean-addon:
6767# /
6868clean : clean-addon
6969
70- .PHONY : clean
70+ .PHONY : clean
Original file line number Diff line number Diff line change 1616* limitations under the License.
1717*/
1818
19- #include <stdint.h>
20-
2119#include "stdlib/math/base/special/nonfibonaccif.h"
2220#include "stdlib/constants/float32/nan.h"
2321#include "stdlib/constants/float32/phi.h"
2624#include "stdlib/math/base/assert/is_nanf.h"
2725#include "stdlib/math/base/special/floorf.h"
2826#include "stdlib/math/base/special/lnf.h"
27+ #include <stdint.h>
2928
3029#define SQRT5 2.23606797749979
3130#define LN_PHI 0.48121182506
5352* // returns NaN
5453*
5554* @example
56- * float y = stdlib_base_nonfibonaccif( 3.14 );
55+ * float y = stdlib_base_nonfibonaccif( 3.14f );
5756* // returns NaN
5857*
5958* @example
@@ -76,7 +75,7 @@ float stdlib_base_nonfibonaccif( const int32_t n ) {
7675
7776 mut_n += 1 ;
7877 a = stdlib_base_lnf ( mut_n * SQRT5 ) / LN_PHI ;
79- b = stdlib_base_lnf ( (SQRT5 * ( mut_n + a ) ) - 5.0f + ( 3.0f / mut_n ) ) / LN_PHI ;
78+ b = stdlib_base_lnf ( ( SQRT5 * ( mut_n + a ) ) - 5.0f + ( 3.0f / mut_n ) ) / LN_PHI ;
8079
8180 return stdlib_base_floorf ( mut_n + b - 2.0f );
8281}
You can’t perform that action at this time.
0 commit comments