diff --git a/lib/node_modules/@stdlib/constants/lapack/dsafmin/README.md b/lib/node_modules/@stdlib/constants/lapack/dsafmin/README.md new file mode 100644 index 000000000000..853641b04eb8 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/lapack/dsafmin/README.md @@ -0,0 +1,153 @@ +<!-- + +@license Apache-2.0 + +Copyright (c) 2025 The Stdlib Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +--> + +# FLOAT64_LAPACK_SAFE_MIN + +> Smallest positive [safe][safe] [double-precision floating-point][ieee754] number. + +<section class="usage"> + +## Usage + +```javascript +var FLOAT64_LAPACK_SAFE_MIN = require( '@stdlib/constants/lapack/dsafmin' ); +``` + +#### FLOAT64_LAPACK_SAFE_MIN + +The smallest positive [safe][safe] [double-precision floating-point][ieee754] number. + +```javascript +var bool = ( FLOAT64_LAPACK_SAFE_MIN === 2.22507385850720138e-308 ); +// returns true +``` + +</section> + +<!-- /.usage --> + +<section class="examples"> + +## Examples + +<!-- eslint no-undef: "error" --> + +```javascript +var randu = require( '@stdlib/random/base/randu' ); +var FLOAT64_LAPACK_SAFE_MIN = require( '@stdlib/constants/lapack/dsafmin' ); + +var x; +var i; + +for ( i = 0; i < 100; i++ ) { + x = ( randu() * 100 ) - 50; + if ( x < FLOAT64_LAPACK_SAFE_MIN ) { + console.log( 'Unsafe: %d', x ); + } else { + console.log( 'Safe: %d', x ); + } +} +``` + +</section> + +<!-- /.examples --> + +<!-- C interface documentation. --> + +* * * + +<section class="c"> + +## C APIs + +<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. --> + +<section class="intro"> + +</section> + +<!-- /.intro --> + +<!-- C usage documentation. --> + +<section class="usage"> + +### Usage + +```c +#include "stdlib/constants/float64/lapack_safe_min.h" +``` + +#### STDLIB_CONSTANT_FLOAT64_LAPACK_SAFE_MIN + +Macro for the smallest positive [safe][safe] [double-precision floating-point][ieee754] number. + +</section> + +<!-- /.usage --> + +<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> + +<section class="notes"> + +</section> + +<!-- /.notes --> + +<!-- C API usage examples. --> + +<section class="examples"> + +</section> + +<!-- /.examples --> + +</section> + +<!-- /.c --> + +<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. --> + +<section class="related"> + +* * * + +## See Also + +</section> + +<!-- /.related --> + +<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> + +<section class="links"> + +[safe]: https://www.netlib.org/lapack/explore-html/d4/d69/namespacela__constants_a7ae97fc519ab76a576db113b17312382.html#a7ae97fc519ab76a576db113b17312382 + +[ieee754]: https://en.wikipedia.org/wiki/IEEE_754-1985 + +<!-- <related-links> --> + +<!-- </related-links> --> + +</section> + +<!-- /.links --> diff --git a/lib/node_modules/@stdlib/constants/lapack/dsafmin/docs/repl.txt b/lib/node_modules/@stdlib/constants/lapack/dsafmin/docs/repl.txt new file mode 100644 index 000000000000..bdb5b5f4d55c --- /dev/null +++ b/lib/node_modules/@stdlib/constants/lapack/dsafmin/docs/repl.txt @@ -0,0 +1,15 @@ + +{{alias}} + Smallest positive safe double-precision floating-point number. + + The smallest positive safe double-precision floating-point number is given + by `real(radix(0._dp),dp)**max(minexponent(0._dp)-1, 1-maxexponent(0._dp))`. + + Examples + -------- + > {{alias}} + 2.22507385850720138e-308 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/constants/lapack/dsafmin/docs/types/index.d.ts b/lib/node_modules/@stdlib/constants/lapack/dsafmin/docs/types/index.d.ts new file mode 100644 index 000000000000..4afb81058ea9 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/lapack/dsafmin/docs/types/index.d.ts @@ -0,0 +1,33 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Smallest positive safe double-precision floating-point number. +* +* @example +* var min = FLOAT64_LAPACK_SAFE_MIN; +* // returns 2.22507385850720138e-308 +*/ +declare const FLOAT64_LAPACK_SAFE_MIN: number; + + +// EXPORTS // + +export = FLOAT64_LAPACK_SAFE_MIN; diff --git a/lib/node_modules/@stdlib/constants/lapack/dsafmin/docs/types/test.ts b/lib/node_modules/@stdlib/constants/lapack/dsafmin/docs/types/test.ts new file mode 100644 index 000000000000..a4a748b649c9 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/lapack/dsafmin/docs/types/test.ts @@ -0,0 +1,28 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import FLOAT64_LAPACK_SAFE_MIN = require( './index' ); + + +// TESTS // + +// The export is a number... +{ + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + FLOAT64_LAPACK_SAFE_MIN; // $ExpectType number +} diff --git a/lib/node_modules/@stdlib/constants/lapack/dsafmin/examples/index.js b/lib/node_modules/@stdlib/constants/lapack/dsafmin/examples/index.js new file mode 100644 index 000000000000..767ee74e844b --- /dev/null +++ b/lib/node_modules/@stdlib/constants/lapack/dsafmin/examples/index.js @@ -0,0 +1,34 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var randu = require( '@stdlib/random/base/randu' ); +var FLOAT64_LAPACK_SAFE_MIN = require( './../lib' ); + +var x; +var i; + +for ( i = 0; i < 100; i++ ) { + x = ( randu() * 100 ) - 50; + if ( x < FLOAT64_LAPACK_SAFE_MIN ) { + console.log( 'Unsafe: %d', x ); + } else { + console.log( 'Safe: %d', x ); + } +} diff --git a/lib/node_modules/@stdlib/constants/lapack/dsafmin/include/stdlib/constants/float64/lapack_safe_min.h b/lib/node_modules/@stdlib/constants/lapack/dsafmin/include/stdlib/constants/float64/lapack_safe_min.h new file mode 100644 index 000000000000..e0b39f27f367 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/lapack/dsafmin/include/stdlib/constants/float64/lapack_safe_min.h @@ -0,0 +1,27 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#ifndef STDLIB_CONSTANTS_FLOAT64_LAPACK_SAFE_MIN_H +#define STDLIB_CONSTANTS_FLOAT64_LAPACK_SAFE_MIN_H + +/** +* Macro for the smallest positive safe double-precision floating-point number. +*/ +#define STDLIB_CONSTANT_FLOAT64_LAPACK_SAFE_MIN 2.22507385850720138e-308 + +#endif // !STDLIB_CONSTANTS_FLOAT64_LAPACK_SAFE_MIN_H diff --git a/lib/node_modules/@stdlib/constants/lapack/dsafmin/lib/index.js b/lib/node_modules/@stdlib/constants/lapack/dsafmin/lib/index.js new file mode 100644 index 000000000000..022ae4d9bc08 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/lapack/dsafmin/lib/index.js @@ -0,0 +1,55 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Smallest positive safe double-precision floating-point number. +* +* @module @stdlib/constants/lapack/dsafmin +* @type {number} +* +* @example +* var FLOAT64_LAPACK_SAFE_MIN = require( '@stdlib/constants/lapack/dsafmin' ); +* // returns 2.22507385850720138e-308 +*/ + + +// MAIN // + +/** +* Smallest positive safe double-precision floating-point number. +* +* ## Notes +* +* The number has the value +* +* ```tex +* real(radix(0._dp),dp)**max(minexponent(0._dp)-1, 1-maxexponent(0._dp)) +* ``` +* +* @constant +* @type {number} +* @default 2.22507385850720138e-308 +*/ +var FLOAT64_LAPACK_SAFE_MIN = 2.22507385850720138e-308; + + +// EXPORTS // + +module.exports = FLOAT64_LAPACK_SAFE_MIN; diff --git a/lib/node_modules/@stdlib/constants/lapack/dsafmin/manifest.json b/lib/node_modules/@stdlib/constants/lapack/dsafmin/manifest.json new file mode 100644 index 000000000000..844d692f6439 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/lapack/dsafmin/manifest.json @@ -0,0 +1,36 @@ +{ + "options": {}, + "fields": [ + { + "field": "src", + "resolve": true, + "relative": true + }, + { + "field": "include", + "resolve": true, + "relative": true + }, + { + "field": "libraries", + "resolve": false, + "relative": false + }, + { + "field": "libpath", + "resolve": true, + "relative": false + } + ], + "confs": [ + { + "src": [], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [] + } + ] +} diff --git a/lib/node_modules/@stdlib/constants/lapack/dsafmin/package.json b/lib/node_modules/@stdlib/constants/lapack/dsafmin/package.json new file mode 100644 index 000000000000..b53bfde0ba58 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/lapack/dsafmin/package.json @@ -0,0 +1,69 @@ +{ + "name": "@stdlib/constants/lapack/dsafmin", + "version": "0.0.0", + "description": "Smallest positive safe double-precision floating-point number.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "constant", + "const", + "min", + "minimum", + "safe", + "integer", + "double", + "dbl", + "floating", + "point", + "floating-point", + "float", + "float64", + "ieee754" + ] +} diff --git a/lib/node_modules/@stdlib/constants/lapack/dsafmin/test/test.js b/lib/node_modules/@stdlib/constants/lapack/dsafmin/test/test.js new file mode 100644 index 000000000000..058fa46761cc --- /dev/null +++ b/lib/node_modules/@stdlib/constants/lapack/dsafmin/test/test.js @@ -0,0 +1,38 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var FLOAT64_LAPACK_SAFE_MIN = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a number', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof FLOAT64_LAPACK_SAFE_MIN, 'number', 'main export is a number' ); + t.end(); +}); + +tape( 'the exported value is 2.22507385850720138e-308', function test( t ) { + t.equal( FLOAT64_LAPACK_SAFE_MIN, 2.22507385850720138e-308, 'returns 2.22507385850720138e-308' ); + t.end(); +});