File tree Expand file tree Collapse file tree 3 files changed +3
-11
lines changed
lib/node_modules/@stdlib/number/float16/base/to-float32 Expand file tree Collapse file tree 3 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,7 @@ var toFloat32 = require( '@stdlib/number/float64/base/to-float32' );
3939* // returns 1.3369140625
4040*/
4141function float16ToFloat32 ( x ) {
42- // Convert to float16 first to ensure we're working with half-precision:
43- x = f16 ( x ) ;
44-
45- return toFloat32 ( x ) ;
42+ return toFloat32 ( f16 ( x ) ) ;
4643}
4744
4845
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- * Convert a half-precision floating-point number to the nearest single-precision floating-point number.
30+ * Converts a half-precision floating-point number to the nearest single-precision floating-point number.
3131*
3232* @private
3333* @param {number } x - half-precision floating-point number
@@ -40,10 +40,7 @@ var addon = require( './../src/addon.node' );
4040* // returns 1.3369140625
4141*/
4242function float16ToFloat32 ( x ) {
43- // Convert to float16 first to ensure we're working with half-precision:
44- x = f16 ( x ) ;
45-
46- return addon ( x ) ;
43+ return addon ( f16 ( x ) ) ;
4744}
4845
4946
Original file line number Diff line number Diff line change 2626#include <stdint.h>
2727#include <string.h>
2828
29- // VARIABLES //
30-
3129static const uint32_t FLOAT16_MAX_EXPONENT = 31 ;
3230
3331/**
You can’t perform that action at this time.
0 commit comments