Skip to content

Commit de7abd0

Browse files
authored
Apply suggestions from code review
Signed-off-by: Gunj Joshi <[email protected]>
1 parent 6331f12 commit de7abd0

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
*

lib/node_modules/@stdlib/math/base/special/nonfibonaccif/src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ clean-addon:
6767
#/
6868
clean: clean-addon
6969

70-
.PHONY: clean
70+
.PHONY: clean

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
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"
@@ -26,6 +24,7 @@
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
@@ -53,7 +52,7 @@
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
}

0 commit comments

Comments
 (0)