@stdlib/constants-float32-eps
Advanced tools
Sorry, the diff of this file is not supported yet
| /// <reference path="../docs/types/index.d.ts" /> | ||
| import FLOAT32_EPSILON from '../docs/types/index'; | ||
| export = FLOAT32_EPSILON; |
| "use strict";var r=require('@stdlib/number-float64-base-to-float32/dist'),e=r(11920928955078125e-23);module.exports=e; | ||
| /** @license Apache-2.0 */ | ||
| //# sourceMappingURL=index.js.map |
| { | ||
| "version": 3, | ||
| "sources": ["../lib/index.js"], | ||
| "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Difference between one and the smallest value greater than one that can be represented as a single-precision floating-point number.\n*\n* @module @stdlib/constants-float32-eps\n* @type {number}\n*\n* @example\n* var FLOAT32_EPSILON = require( '@stdlib/constants-float32-eps' );\n* // returns 1.1920928955078125e-7\n*/\n\n// MODULES //\n\nvar float64ToFloat32 = require( '@stdlib/number-float64-base-to-float32' );\n\n\n// MAIN //\n\n/**\n* Difference between one and the smallest value greater than one that can be represented as a single-precision floating-point number.\n*\n* ## Notes\n*\n* The difference is equal to\n*\n* ```tex\n* \\frac{1}{2^{23}}\n* ```\n*\n* @constant\n* @type {number}\n* @default 1.1920928955078125e-7\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n* @see [Machine Epsilon]{@link https://en.wikipedia.org/wiki/Machine_epsilon}\n*/\nvar FLOAT32_EPSILON = float64ToFloat32( 1.1920928955078125e-7 );\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT32_EPSILON;\n"], | ||
| "mappings": "aAiCA,IAAIA,EAAmB,QAAS,wCAAyC,EAsBrEC,EAAkBD,EAAkB,qBAAsB,EAK9D,OAAO,QAAUC", | ||
| "names": ["float64ToFloat32", "FLOAT32_EPSILON"] | ||
| } |
@@ -19,3 +19,3 @@ /* | ||
| // TypeScript Version: 2.0 | ||
| // TypeScript Version: 4.1 | ||
@@ -22,0 +22,0 @@ /** |
+1
-1
@@ -1,1 +0,1 @@ | ||
| Copyright (c) 2016-2022 The Stdlib Authors. | ||
| Copyright (c) 2016-2023 The Stdlib Authors. |
+11
-10
| { | ||
| "name": "@stdlib/constants-float32-eps", | ||
| "version": "0.0.7", | ||
| "version": "0.1.0", | ||
| "description": "Difference between one and the smallest value greater than one that can be represented as a single-precision floating-point number.", | ||
@@ -20,2 +20,3 @@ "license": "Apache-2.0", | ||
| "example": "./examples", | ||
| "include": "./include", | ||
| "lib": "./lib", | ||
@@ -39,13 +40,13 @@ "test": "./test" | ||
| "dependencies": { | ||
| "@stdlib/number-float64-base-to-float32": "^0.0.x", | ||
| "@stdlib/utils-library-manifest": "^0.0.x" | ||
| "@stdlib/number-float64-base-to-float32": "^0.1.0", | ||
| "@stdlib/utils-library-manifest": "^0.1.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@stdlib/math-base-special-abs": "^0.0.x", | ||
| "@stdlib/math-base-special-max": "^0.0.x", | ||
| "@stdlib/math-base-special-pow": "^0.0.x", | ||
| "@stdlib/random-base-randu": "^0.0.x", | ||
| "@stdlib/math-base-special-abs": "^0.0.6", | ||
| "@stdlib/math-base-special-max": "^0.1.0", | ||
| "@stdlib/math-base-special-pow": "^0.0.7", | ||
| "@stdlib/random-base-randu": "^0.0.8", | ||
| "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" | ||
| }, | ||
@@ -85,5 +86,5 @@ "engines": { | ||
| "funding": { | ||
| "type": "patreon", | ||
| "url": "https://www.patreon.com/athan" | ||
| "type": "opencollective", | ||
| "url": "https://opencollective.com/stdlib" | ||
| } | ||
| } |
+16
-5
@@ -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> | ||
| # FLOAT32_EPS | ||
@@ -180,3 +191,3 @@ | ||
| - <span class="package-name">[`@stdlib/constants/float64/eps`][@stdlib/constants/float64/eps]</span><span class="delimiter">: </span><span class="description">difference between one and the smallest value greater than one that can be represented as a double-precision floating-point number.</span> | ||
| - <span class="package-name">[`@stdlib/constants-float64/eps`][@stdlib/constants/float64/eps]</span><span class="delimiter">: </span><span class="description">difference between one and the smallest value greater than one that can be represented as a double-precision floating-point number.</span> | ||
@@ -213,3 +224,3 @@ </section> | ||
| Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. | ||
| Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. | ||
@@ -227,4 +238,4 @@ </section> | ||
| [test-image]: https://github.com/stdlib-js/constants-float32-eps/actions/workflows/test.yml/badge.svg?branch=v0.0.7 | ||
| [test-url]: https://github.com/stdlib-js/constants-float32-eps/actions/workflows/test.yml?query=branch:v0.0.7 | ||
| [test-image]: https://github.com/stdlib-js/constants-float32-eps/actions/workflows/test.yml/badge.svg?branch=v0.1.0 | ||
| [test-url]: https://github.com/stdlib-js/constants-float32-eps/actions/workflows/test.yml?query=branch:v0.1.0 | ||
@@ -242,3 +253,3 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/constants-float32-eps/main.svg | ||
| [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg | ||
| [chat-url]: https://gitter.im/stdlib-js/stdlib/ | ||
| [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im | ||
@@ -245,0 +256,0 @@ [stdlib]: https://github.com/stdlib-js/stdlib |
| {{alias}} | ||
| Difference between one and the smallest value greater than one that can be | ||
| represented as a single-precision floating-point number. | ||
| Examples | ||
| -------- | ||
| > {{alias}} | ||
| 1.1920928955078125e-7 | ||
| See Also | ||
| -------- | ||
| /* | ||
| * @license Apache-2.0 | ||
| * | ||
| * Copyright (c) 2019 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 FLOAT32_EPSILON = require( './index' ); | ||
| // TESTS // | ||
| // The export is a number... | ||
| { | ||
| // tslint:disable-next-line:no-unused-expression | ||
| FLOAT32_EPSILON; // $ExpectType number | ||
| } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
31855
10.01%13
18.18%278
4.12%0
-100%120
-13.67%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed