Socket
Socket
Sign inDemoInstall

@stdlib/math-base-special-abs

Package Overview
Dependencies
84
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.6 to 0.1.0

CITATION.cff

2

docs/types/index.d.ts

@@ -19,3 +19,3 @@ /*

// TypeScript Version: 2.0
// TypeScript Version: 4.1

@@ -22,0 +22,0 @@ /**

@@ -25,2 +25,3 @@ /**

var Uint32Array = require( '@stdlib/array-uint32' );
var ABS_MASK = require( '@stdlib/constants-float64-high-word-abs-mask' );
var HIGH = require( './high.js' );

@@ -34,6 +35,3 @@

// 0x7fffffff = 2147483647 => 0 11111111111 11111111111111111111
var ABS_MASK = 0x7fffffff>>>0; // asm type annotation
// MAIN //

@@ -75,3 +73,2 @@

*
*
* ## References

@@ -78,0 +75,0 @@ *

@@ -47,3 +47,3 @@ /**

var abs = require( './main.js' );
var main = require( './main.js' );

@@ -53,2 +53,2 @@

module.exports = abs;
module.exports = main;

@@ -31,3 +31,3 @@ {

"src": [
"./src/abs.c"
"./src/main.c"
],

@@ -41,3 +41,4 @@ "include": [

"@stdlib/math-base-napi-unary",
"@stdlib/number-float64-base-to-words"
"@stdlib/constants-float64-high-word-abs-mask",
"@stdlib/number-float64-base-to-words"
]

@@ -48,3 +49,3 @@ },

"src": [
"./src/abs.c"
"./src/main.c"
],

@@ -57,3 +58,4 @@ "include": [

"dependencies": [
"@stdlib/number-float64-base-to-words"
"@stdlib/constants-float64-high-word-abs-mask",
"@stdlib/number-float64-base-to-words"
]

@@ -64,3 +66,3 @@ },

"src": [
"./src/abs.c"
"./src/main.c"
],

@@ -73,3 +75,4 @@ "include": [

"dependencies": [
"@stdlib/number-float64-base-to-words"
"@stdlib/constants-float64-high-word-abs-mask",
"@stdlib/number-float64-base-to-words"
]

@@ -76,0 +79,0 @@ }

{
"name": "@stdlib/math-base-special-abs",
"version": "0.0.6",
"version": "0.1.0",
"description": "Compute the absolute value of a double-precision floating-point number.",

@@ -43,23 +43,24 @@ "license": "Apache-2.0",

"dependencies": {
"@stdlib/math-base-napi-unary": "^0.0.x",
"@stdlib/number-float64-base-to-words": "^0.0.x",
"@stdlib/utils-library-manifest": "^0.0.x"
"@stdlib/constants-float64-high-word-abs-mask": "^0.1.0",
"@stdlib/math-base-napi-unary": "^0.1.0",
"@stdlib/number-float64-base-to-words": "^0.1.0",
"@stdlib/utils-library-manifest": "^0.1.0"
},
"devDependencies": {
"@stdlib/array-float64": "^0.0.x",
"@stdlib/array-uint32": "^0.0.x",
"@stdlib/assert-is-little-endian": "^0.0.x",
"@stdlib/bench": "^0.0.x",
"@stdlib/constants-float64-ninf": "^0.0.x",
"@stdlib/constants-float64-pi": "^0.0.x",
"@stdlib/constants-float64-pinf": "^0.0.x",
"@stdlib/math-base-assert-is-nan": "^0.0.x",
"@stdlib/math-base-assert-is-positive-zero": "^0.0.x",
"@stdlib/math-base-special-round": "^0.0.x",
"@stdlib/random-base-randu": "^0.0.x",
"@stdlib/utils-try-require": "^0.0.x",
"@stdlib/array-float64": "^0.1.0",
"@stdlib/array-uint32": "^0.1.0",
"@stdlib/assert-is-little-endian": "^0.1.0",
"@stdlib/bench": "^0.1.0",
"@stdlib/constants-float64-ninf": "^0.1.0",
"@stdlib/constants-float64-pi": "^0.1.0",
"@stdlib/constants-float64-pinf": "^0.1.0",
"@stdlib/math-base-assert-is-nan": "^0.1.0",
"@stdlib/math-base-assert-is-positive-zero": "^0.1.0",
"@stdlib/math-base-special-round": "^0.1.0",
"@stdlib/random-base-randu": "^0.0.8",
"@stdlib/utils-try-require": "^0.1.0",
"proxyquire": "^2.0.0",
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
"istanbul": "^0.4.1",
"tap-spec": "5.x.x"
"tap-min": "git+https://github.com/Planeshifter/tap-min.git"
},

@@ -95,7 +96,89 @@ "engines": {

],
"__stdlib__": {},
"__stdlib__": {
"stability": "stable",
"envs": {
"node": true,
"browser": true,
"repl": true
},
"namespaces": {
"repl": true,
"parent": false
},
"namespace": false,
"standalone": true,
"c_api": true,
"addon": false,
"wasm": false,
"cli": false,
"benchmarks": {
"c": true,
"cephes": true,
"cpp": false,
"boost": false,
"fortran": false,
"python": true,
"numpy": false,
"scipy": false,
"r": true,
"julia": true,
"js": true
},
"examples": {
"c": true,
"cpp": false,
"fortran": false,
"js": true
},
"dtype": "float64",
"base_alias": "abs",
"alias": "abs",
"short_desc": "absolute value",
"link_text": "absolute value",
"domain": [
{
"min": "-infinity",
"max": "infinity"
}
],
"rand": {
"min": -10,
"max": 10
},
"keywords": [
"absolute",
"value",
"abs",
"magnitude"
],
"extra_keywords": [
"math.abs"
],
"example_values": [
-2,
1,
3,
-5,
4,
0,
-1,
-3,
-3.14,
5.6,
-9,
-5.55,
3.5,
10,
-9.99,
3,
-6,
-7,
8,
-7.77
]
},
"funding": {
"type": "patreon",
"url": "https://www.patreon.com/athan"
"type": "opencollective",
"url": "https://opencollective.com/stdlib"
}
}

@@ -21,2 +21,13 @@ <!--

<details>
<summary>
About stdlib...
</summary>
<p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
<p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
<p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
<p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
</details>
# Absolute Value

@@ -35,3 +46,3 @@

<div class="equation" align="center" data-raw-text="|x| = \begin{cases} x &amp; \textrm{if}\ x \geq 0 \\ -x &amp; \textrm{if}\ x &lt; 0\end{cases}" data-equation="eq:absolute_value">
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@bb29798906e119fcb2af99e94b60407a270c9b32/lib/node_modules/@stdlib/math/base/special/abs/docs/img/equation_absolute_value.svg" alt="Absolute value">
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@bb29798906e119fcb2af99e94b60407a270c9b32/C:\Users\pb\Documents\GitHub\stdlib\lib\node_modules\@stdlib\math\base\special\abs\docs\img\equation_absolute_value.svg" alt="Absolute value">
<br>

@@ -178,4 +189,4 @@ </div>

int main() {
double x[] = { 3.14, -3.14, 0.0, 0.0/0.0 };
int main( void ) {
const double x[] = { 3.14, -3.14, 0.0, 0.0/0.0 };

@@ -207,5 +218,5 @@ double y;

- <span class="package-name">[`@stdlib/math/base/special/abs2`][@stdlib/math/base/special/abs2]</span><span class="delimiter">: </span><span class="description">compute the squared absolute value of a double-precision floating-point number.</span>
- <span class="package-name">[`@stdlib/math/base/special/absf`][@stdlib/math/base/special/absf]</span><span class="delimiter">: </span><span class="description">compute the absolute value of a single-precision floating-point number.</span>
- <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>
- <span class="package-name">[`@stdlib/math-base/special/abs2`][@stdlib/math/base/special/abs2]</span><span class="delimiter">: </span><span class="description">compute the squared absolute value of a double-precision floating-point number.</span>
- <span class="package-name">[`@stdlib/math-base/special/absf`][@stdlib/math/base/special/absf]</span><span class="delimiter">: </span><span class="description">compute the absolute value of a single-precision floating-point number.</span>
- <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>

@@ -242,3 +253,3 @@ </section>

Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].

@@ -256,4 +267,4 @@ </section>

[test-image]: https://github.com/stdlib-js/math-base-special-abs/actions/workflows/test.yml/badge.svg
[test-url]: https://github.com/stdlib-js/math-base-special-abs/actions/workflows/test.yml
[test-image]: https://github.com/stdlib-js/math-base-special-abs/actions/workflows/test.yml/badge.svg?branch=v0.1.0
[test-url]: https://github.com/stdlib-js/math-base-special-abs/actions/workflows/test.yml?query=branch:v0.1.0

@@ -270,2 +281,9 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-abs/main.svg

[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
[chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
[stdlib]: https://github.com/stdlib-js/stdlib
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
[umd]: https://github.com/umdjs/umd

@@ -277,10 +295,4 @@ [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

[esm-url]: https://github.com/stdlib-js/math-base-special-abs/tree/esm
[branches-url]: https://github.com/stdlib-js/math-base-special-abs/blob/main/branches.md
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
[chat-url]: https://gitter.im/stdlib-js/stdlib/
[stdlib]: https://github.com/stdlib-js/stdlib
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/math-base-special-abs/main/LICENSE

@@ -287,0 +299,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc