Skip to content

Commit c9bad00

Browse files
committed
chore: clean-up
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent d8b8855 commit c9bad00

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

lib/node_modules/@stdlib/math/base/napi/unary/README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -552,20 +552,16 @@ void stdlib_math_base_napi_f_i( napi_env env, napi_callback_info info, int32_t (
552552
Macro for registering a Node-API module exporting an interface for invoking a unary function accepting and returning half-precision floating-point numbers.
553553
554554
```c
555-
#include "stdlib/number/float64/base/to_float16.h"
556-
#include "stdlib/number/float16/base/to_float64.h"
557555
#include "stdlib/number/float16/ctor.h"
558556
559-
static stdlib_float16_t scale( const stdlib_float16_t x ) {
560-
double y = stdlib_base_float16_to_float64( x );
561-
y *= 10.0;
562-
return stdlib_base_float64_to_float16( y );
557+
static stdlib_float16_t identity( const stdlib_float16_t x ) {
558+
return x;
563559
}
564560
565561
// ...
566562
567563
// Register a Node-API module:
568-
STDLIB_MATH_BASE_NAPI_MODULE_H_H( scale );
564+
STDLIB_MATH_BASE_NAPI_MODULE_H_H( identity );
569565
```
570566

571567
The macro expects the following arguments:
@@ -579,7 +575,6 @@ When used, this macro should be used **instead of** `NAPI_MODULE`. The macro inc
579575
Invokes a unary function accepting and returning half-precision floating-point numbers.
580576

581577
```c
582-
#include "stdlib/number/float64/base/to_float16.h"
583578
#include "stdlib/number/float16/ctor.h"
584579
#include <node_api.h>
585580

lib/node_modules/@stdlib/math/base/napi/unary/include/stdlib/math/base/napi/unary/h_h.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,16 @@
2929
* @param fcn unary function
3030
*
3131
* @example
32-
* #include "stdlib/number/float64/base/to_float16.h"
33-
* #include "stdlib/number/float16/base/to_float64.h"
3432
* #include "stdlib/number/float16/ctor.h"
3533
*
36-
* static stdlib_float16_t scale( const stdlib_float16_t x ) {
37-
* double y = stdlib_base_float16_to_float64( x );
38-
* y *= 10.0;
39-
* return stdlib_base_float64_to_float16( y );
34+
* static stdlib_float16_t identity( const stdlib_float16_t x ) {
35+
* return x;
4036
* }
4137
*
4238
* // ...
4339
*
4440
* // Register a Node-API module:
45-
* STDLIB_MATH_BASE_NAPI_MODULE_H_H( scale );
41+
* STDLIB_MATH_BASE_NAPI_MODULE_H_H( identity );
4642
*/
4743
#define STDLIB_MATH_BASE_NAPI_MODULE_H_H( fcn ) \
4844
static napi_value stdlib_math_base_napi_h_h_wrapper( \

lib/node_modules/@stdlib/math/base/napi/unary/manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
"@stdlib/complex/float32/ctor",
5353
"@stdlib/complex/float64/ctor",
5454
"@stdlib/complex/float64/reim",
55-
"@stdlib/complex/float32/reim"
55+
"@stdlib/complex/float32/reim",
56+
"@stdlib/number/float16/ctor"
5657
]
5758
}
5859
]

0 commit comments

Comments
 (0)