@stdlib/math-base-special-absf 0.0.2 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +1 -1
- package/README.md +50 -14
- package/package.json +3 -3
- package/CHANGELOG.md +0 -5
- package/binding.gyp +0 -170
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2022 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ limitations under the License.
|
|
|
20
20
|
|
|
21
21
|
# Absolute Value
|
|
22
22
|
|
|
23
|
-
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] [![dependencies][dependencies-image]][dependencies-url]
|
|
23
|
+
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
|
|
24
24
|
|
|
25
25
|
> Compute the [absolute value][absolute-value] of a single-precision floating-point number.
|
|
26
26
|
|
|
@@ -31,7 +31,7 @@ The [absolute value][absolute-value] is defined as
|
|
|
31
31
|
<!-- <equation class="equation" label="eq:absolute_value" align="center" raw="|x| = \begin{cases} x & \textrm{if}\ x \geq 0 \\ -x & \textrm{if}\ x < 0\end{cases}" alt="Absolute value"> -->
|
|
32
32
|
|
|
33
33
|
<div class="equation" align="center" data-raw-text="|x| = \begin{cases} x & \textrm{if}\ x \geq 0 \\ -x & \textrm{if}\ x < 0\end{cases}" data-equation="eq:absolute_value">
|
|
34
|
-
<img src="https://cdn.
|
|
34
|
+
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@5b4ee1217697eb737011e0d588fddbb119806753/lib/node_modules/@stdlib/math/base/special/absf/docs/img/equation_absolute_value.svg" alt="Absolute value">
|
|
35
35
|
<br>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
@@ -126,16 +126,6 @@ for ( i = 0; i < 100; i++ ) {
|
|
|
126
126
|
|
|
127
127
|
<!-- C usage documentation. -->
|
|
128
128
|
|
|
129
|
-
<section class="installation">
|
|
130
|
-
|
|
131
|
-
## Installation
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
npm install @stdlib/math-base-special-absf
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
</section>
|
|
138
|
-
|
|
139
129
|
<section class="usage">
|
|
140
130
|
|
|
141
131
|
### Usage
|
|
@@ -203,6 +193,24 @@ int main() {
|
|
|
203
193
|
|
|
204
194
|
<!-- /.c -->
|
|
205
195
|
|
|
196
|
+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
|
|
197
|
+
|
|
198
|
+
<section class="related">
|
|
199
|
+
|
|
200
|
+
* * *
|
|
201
|
+
|
|
202
|
+
## See Also
|
|
203
|
+
|
|
204
|
+
- <span class="package-name">[`@stdlib/math/base/special/abs`][@stdlib/math/base/special/abs]</span><span class="delimiter">: </span><span class="description">compute the absolute value of a double-precision floating-point number.</span>
|
|
205
|
+
- <span class="package-name">[`@stdlib/math/base/special/abs2f`][@stdlib/math/base/special/abs2f]</span><span class="delimiter">: </span><span class="description">compute the squared absolute value of a single-precision floating-point number.</span>
|
|
206
|
+
- <span class="package-name">[`@stdlib/math/base/special/labs`][@stdlib/math/base/special/labs]</span><span class="delimiter">: </span><span class="description">compute an absolute value of a signed 32-bit integer.</span>
|
|
207
|
+
|
|
208
|
+
</section>
|
|
209
|
+
|
|
210
|
+
<!-- /.related -->
|
|
211
|
+
|
|
212
|
+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
213
|
+
|
|
206
214
|
|
|
207
215
|
<section class="main-repo" >
|
|
208
216
|
|
|
@@ -214,6 +222,10 @@ This package is part of [stdlib][stdlib], a standard library for JavaScript and
|
|
|
214
222
|
|
|
215
223
|
For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib].
|
|
216
224
|
|
|
225
|
+
#### Community
|
|
226
|
+
|
|
227
|
+
[![Chat][chat-image]][chat-url]
|
|
228
|
+
|
|
217
229
|
---
|
|
218
230
|
|
|
219
231
|
## License
|
|
@@ -223,7 +235,7 @@ See [LICENSE][stdlib-license].
|
|
|
223
235
|
|
|
224
236
|
## Copyright
|
|
225
237
|
|
|
226
|
-
Copyright © 2016-
|
|
238
|
+
Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors].
|
|
227
239
|
|
|
228
240
|
</section>
|
|
229
241
|
|
|
@@ -242,9 +254,23 @@ Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].
|
|
|
242
254
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-absf/main.svg
|
|
243
255
|
[coverage-url]: https://codecov.io/github/stdlib-js/math-base-special-absf?branch=main
|
|
244
256
|
|
|
245
|
-
|
|
257
|
+
<!--
|
|
258
|
+
|
|
259
|
+
[dependencies-image]: https://img.shields.io/david/stdlib-js/math-base-special-absf.svg
|
|
246
260
|
[dependencies-url]: https://david-dm.org/stdlib-js/math-base-special-absf/main
|
|
247
261
|
|
|
262
|
+
-->
|
|
263
|
+
|
|
264
|
+
[umd]: https://github.com/umdjs/umd
|
|
265
|
+
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
266
|
+
|
|
267
|
+
[deno-url]: https://github.com/stdlib-js/math-base-special-absf/tree/deno
|
|
268
|
+
[umd-url]: https://github.com/stdlib-js/math-base-special-absf/tree/umd
|
|
269
|
+
[esm-url]: https://github.com/stdlib-js/math-base-special-absf/tree/esm
|
|
270
|
+
|
|
271
|
+
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
|
|
272
|
+
[chat-url]: https://gitter.im/stdlib-js/stdlib/
|
|
273
|
+
|
|
248
274
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
249
275
|
|
|
250
276
|
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
@@ -253,6 +279,16 @@ Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].
|
|
|
253
279
|
|
|
254
280
|
[absolute-value]: https://en.wikipedia.org/wiki/Absolute_value
|
|
255
281
|
|
|
282
|
+
<!-- <related-links> -->
|
|
283
|
+
|
|
284
|
+
[@stdlib/math/base/special/abs]: https://www.npmjs.com/package/@stdlib/math-base-special-abs
|
|
285
|
+
|
|
286
|
+
[@stdlib/math/base/special/abs2f]: https://www.npmjs.com/package/@stdlib/math-base-special-abs2f
|
|
287
|
+
|
|
288
|
+
[@stdlib/math/base/special/labs]: https://www.npmjs.com/package/@stdlib/math-base-special-labs
|
|
289
|
+
|
|
290
|
+
<!-- </related-links> -->
|
|
291
|
+
|
|
256
292
|
</section>
|
|
257
293
|
|
|
258
294
|
<!-- /.links -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/math-base-special-absf",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Compute the absolute value of a single-precision floating-point number.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
16
|
"main": "./lib",
|
|
17
|
-
"gypfile":
|
|
17
|
+
"gypfile": false,
|
|
18
18
|
"directories": {
|
|
19
19
|
"benchmark": "./benchmark",
|
|
20
20
|
"doc": "./docs",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"examples": "make examples",
|
|
32
32
|
"benchmark": "make benchmark"
|
|
33
33
|
},
|
|
34
|
-
"homepage": "https://
|
|
34
|
+
"homepage": "https://stdlib.io",
|
|
35
35
|
"repository": {
|
|
36
36
|
"type": "git",
|
|
37
37
|
"url": "git://github.com/stdlib-js/math-base-special-absf.git"
|
package/CHANGELOG.md
DELETED
package/binding.gyp
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
# @license Apache-2.0
|
|
2
|
-
#
|
|
3
|
-
# Copyright (c) 2020 The Stdlib Authors.
|
|
4
|
-
#
|
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
# you may not use this file except in compliance with the License.
|
|
7
|
-
# You may obtain a copy of the License at
|
|
8
|
-
#
|
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
#
|
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
# See the License for the specific language governing permissions and
|
|
15
|
-
# limitations under the License.
|
|
16
|
-
|
|
17
|
-
# A `.gyp` file for building a Node.js native add-on.
|
|
18
|
-
#
|
|
19
|
-
# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
|
|
20
|
-
# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
|
|
21
|
-
{
|
|
22
|
-
# List of files to include in this file:
|
|
23
|
-
'includes': [
|
|
24
|
-
'./include.gypi',
|
|
25
|
-
],
|
|
26
|
-
|
|
27
|
-
# Define variables to be used throughout the configuration for all targets:
|
|
28
|
-
'variables': {
|
|
29
|
-
# Target name should match the add-on export name:
|
|
30
|
-
'addon_target_name%': 'addon',
|
|
31
|
-
|
|
32
|
-
# Set variables based on the host OS:
|
|
33
|
-
'conditions': [
|
|
34
|
-
[
|
|
35
|
-
'OS=="win"',
|
|
36
|
-
{
|
|
37
|
-
# Define the object file suffix:
|
|
38
|
-
'obj': 'obj',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
# Define the object file suffix:
|
|
42
|
-
'obj': 'o',
|
|
43
|
-
}
|
|
44
|
-
], # end condition (OS=="win")
|
|
45
|
-
], # end conditions
|
|
46
|
-
}, # end variables
|
|
47
|
-
|
|
48
|
-
# Define compile targets:
|
|
49
|
-
'targets': [
|
|
50
|
-
|
|
51
|
-
# Target to generate an add-on:
|
|
52
|
-
{
|
|
53
|
-
# The target name should match the add-on export name:
|
|
54
|
-
'target_name': '<(addon_target_name)',
|
|
55
|
-
|
|
56
|
-
# Define dependencies:
|
|
57
|
-
'dependencies': [],
|
|
58
|
-
|
|
59
|
-
# Define directories which contain relevant include headers:
|
|
60
|
-
'include_dirs': [
|
|
61
|
-
# Local include directory:
|
|
62
|
-
'<@(include_dirs)',
|
|
63
|
-
],
|
|
64
|
-
|
|
65
|
-
# List of source files:
|
|
66
|
-
'sources': [
|
|
67
|
-
'<@(src_files)',
|
|
68
|
-
],
|
|
69
|
-
|
|
70
|
-
# Settings which should be applied when a target's object files are used as linker input:
|
|
71
|
-
'link_settings': {
|
|
72
|
-
# Define libraries:
|
|
73
|
-
'libraries': [
|
|
74
|
-
'<@(libraries)',
|
|
75
|
-
],
|
|
76
|
-
|
|
77
|
-
# Define library directories:
|
|
78
|
-
'library_dirs': [
|
|
79
|
-
'<@(library_dirs)',
|
|
80
|
-
],
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
# C/C++ compiler flags:
|
|
84
|
-
'cflags': [
|
|
85
|
-
# Enable commonly used warning options:
|
|
86
|
-
'-Wall',
|
|
87
|
-
|
|
88
|
-
# Aggressive optimization:
|
|
89
|
-
'-O3',
|
|
90
|
-
],
|
|
91
|
-
|
|
92
|
-
# C specific compiler flags:
|
|
93
|
-
'cflags_c': [
|
|
94
|
-
# Specify the C standard to which a program is expected to conform:
|
|
95
|
-
'-std=c99',
|
|
96
|
-
],
|
|
97
|
-
|
|
98
|
-
# C++ specific compiler flags:
|
|
99
|
-
'cflags_cpp': [
|
|
100
|
-
# Specify the C++ standard to which a program is expected to conform:
|
|
101
|
-
'-std=c++11',
|
|
102
|
-
],
|
|
103
|
-
|
|
104
|
-
# Linker flags:
|
|
105
|
-
'ldflags': [],
|
|
106
|
-
|
|
107
|
-
# Apply conditions based on the host OS:
|
|
108
|
-
'conditions': [
|
|
109
|
-
[
|
|
110
|
-
'OS=="mac"',
|
|
111
|
-
{
|
|
112
|
-
# Linker flags:
|
|
113
|
-
'ldflags': [
|
|
114
|
-
'-undefined dynamic_lookup',
|
|
115
|
-
'-Wl,-no-pie',
|
|
116
|
-
'-Wl,-search_paths_first',
|
|
117
|
-
],
|
|
118
|
-
},
|
|
119
|
-
], # end condition (OS=="mac")
|
|
120
|
-
[
|
|
121
|
-
'OS!="win"',
|
|
122
|
-
{
|
|
123
|
-
# C/C++ flags:
|
|
124
|
-
'cflags': [
|
|
125
|
-
# Generate platform-independent code:
|
|
126
|
-
'-fPIC',
|
|
127
|
-
],
|
|
128
|
-
},
|
|
129
|
-
], # end condition (OS!="win")
|
|
130
|
-
], # end conditions
|
|
131
|
-
}, # end target <(addon_target_name)
|
|
132
|
-
|
|
133
|
-
# Target to copy a generated add-on to a standard location:
|
|
134
|
-
{
|
|
135
|
-
'target_name': 'copy_addon',
|
|
136
|
-
|
|
137
|
-
# Declare that the output of this target is not linked:
|
|
138
|
-
'type': 'none',
|
|
139
|
-
|
|
140
|
-
# Define dependencies:
|
|
141
|
-
'dependencies': [
|
|
142
|
-
# Require that the add-on be generated before building this target:
|
|
143
|
-
'<(addon_target_name)',
|
|
144
|
-
],
|
|
145
|
-
|
|
146
|
-
# Define a list of actions:
|
|
147
|
-
'actions': [
|
|
148
|
-
{
|
|
149
|
-
'action_name': 'copy_addon',
|
|
150
|
-
'message': 'Copying addon...',
|
|
151
|
-
|
|
152
|
-
# Explicitly list the inputs in the command-line invocation below:
|
|
153
|
-
'inputs': [],
|
|
154
|
-
|
|
155
|
-
# Declare the expected outputs:
|
|
156
|
-
'outputs': [
|
|
157
|
-
'<(addon_output_dir)/<(addon_target_name).node',
|
|
158
|
-
],
|
|
159
|
-
|
|
160
|
-
# Define the command-line invocation:
|
|
161
|
-
'action': [
|
|
162
|
-
'cp',
|
|
163
|
-
'<(PRODUCT_DIR)/<(addon_target_name).node',
|
|
164
|
-
'<(addon_output_dir)/<(addon_target_name).node',
|
|
165
|
-
],
|
|
166
|
-
},
|
|
167
|
-
], # end actions
|
|
168
|
-
}, # end target copy_addon
|
|
169
|
-
], # end targets
|
|
170
|
-
}
|