diff --git a/lib/node_modules/@stdlib/constants/float32/e/README.md b/lib/node_modules/@stdlib/constants/float32/e/README.md new file mode 100644 index 000000000000..08480086c0f8 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/e/README.md @@ -0,0 +1,135 @@ + + +# E + +> The mathematical constant [_e_][e]. + +
+ +## Usage + +```javascript +var E = require( '@stdlib/constants/float32/e' ); +``` + +#### E + +The mathematical constant [_e_][e], also known as Euler's number or Napier's constant. [_e_][e] is the base of the natural logarithm. + +```javascript +var bool = ( E === 2.7182817459106445 ); +// returns true +``` + +
+ + + +
+ +## Examples + + + + + +```javascript +var E = require( '@stdlib/constants/float32/e' ); + +console.log( E ); +// => 2.7182817459106445 +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/constants/float32/e.h" +``` + +#### STDLIB_CONSTANT_FLOAT32_E + +Macro for Euler's number. + +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/constants/float32/e/docs/repl.txt b/lib/node_modules/@stdlib/constants/float32/e/docs/repl.txt new file mode 100644 index 000000000000..817ec5de0b21 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/e/docs/repl.txt @@ -0,0 +1,12 @@ + +{{alias}} + Euler's number. + + Examples + -------- + > {{alias}} + 2.7182817459106445 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/constants/float32/e/docs/types/index.d.ts b/lib/node_modules/@stdlib/constants/float32/e/docs/types/index.d.ts new file mode 100644 index 000000000000..a4af37e9df15 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/e/docs/types/index.d.ts @@ -0,0 +1,33 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 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 + +/** +* Euler's number. +* +* @example +* var e = E; +* // returns 2.7182817459106445 +*/ +declare const E: number; + + +// EXPORTS // + +export = E; diff --git a/lib/node_modules/@stdlib/constants/float32/e/docs/types/test.ts b/lib/node_modules/@stdlib/constants/float32/e/docs/types/test.ts new file mode 100644 index 000000000000..763c1963b354 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/e/docs/types/test.ts @@ -0,0 +1,28 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 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 E = require( './index' ); + + +// TESTS // + +// The export is a number... +{ + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + E; // $ExpectType number +} diff --git a/lib/node_modules/@stdlib/constants/float32/e/examples/index.js b/lib/node_modules/@stdlib/constants/float32/e/examples/index.js new file mode 100644 index 000000000000..3ac8e579c54e --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/e/examples/index.js @@ -0,0 +1,24 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 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 E = require( './../lib' ); + +console.log( E ); +// => 2.7182817459106445 diff --git a/lib/node_modules/@stdlib/constants/float32/e/include/stdlib/constants/float32/e.h b/lib/node_modules/@stdlib/constants/float32/e/include/stdlib/constants/float32/e.h new file mode 100644 index 000000000000..fb8164a55ca9 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/e/include/stdlib/constants/float32/e.h @@ -0,0 +1,27 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 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_FLOAT32_E_H +#define STDLIB_CONSTANTS_FLOAT32_E_H + +/** +* Macro for Euler's number. +*/ +#define STDLIB_CONSTANT_FLOAT32_E 2.718281828459045f + +#endif // !STDLIB_CONSTANTS_FLOAT32_E_H diff --git a/lib/node_modules/@stdlib/constants/float32/e/lib/index.js b/lib/node_modules/@stdlib/constants/float32/e/lib/index.js new file mode 100644 index 000000000000..4432365b069b --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/e/lib/index.js @@ -0,0 +1,53 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 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'; + +/** +* Euler's number. +* +* @module @stdlib/constants/float32/e +* @type {number} +* +* @example +* var E = require( '@stdlib/constants/float32/e' ); +* // returns 2.7182817459106445 +*/ + +// MODULES // + +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); + + +// MAIN // + +/** +* Euler's number. +* +* @constant +* @type {number} +* @default 2.7182817459106445 +* @see [OEIS]{@link https://oeis.org/A001113} +* @see [Wikipedia]{@link https://en.wikipedia.org/wiki/E_(mathematical_constant)} +*/ +var E = float64ToFloat32( 2.718281828459045 ); + + +// EXPORTS // + +module.exports = E; diff --git a/lib/node_modules/@stdlib/constants/float32/e/manifest.json b/lib/node_modules/@stdlib/constants/float32/e/manifest.json new file mode 100644 index 000000000000..844d692f6439 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/e/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/float32/e/package.json b/lib/node_modules/@stdlib/constants/float32/e/package.json new file mode 100644 index 000000000000..a502bc1d7b9d --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/e/package.json @@ -0,0 +1,67 @@ +{ + "name": "@stdlib/constants/float32/e", + "version": "0.0.0", + "description": "Euler's 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", + "mathematics", + "math", + "e", + "euler", + "napier", + "ieee754", + "single", + "precision", + "floating-point", + "float32" + ] +} diff --git a/lib/node_modules/@stdlib/constants/float32/e/test/test.js b/lib/node_modules/@stdlib/constants/float32/e/test/test.js new file mode 100644 index 000000000000..ce7ab560d81b --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/e/test/test.js @@ -0,0 +1,38 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 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 E = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a number', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof E, 'number', 'main export is a number' ); + t.end(); +}); + +tape( 'export is a single-precision floating-point number equal to 2.7182817459106445', function test( t ) { + t.equal( E, 2.7182817459106445, 'equals 2.7182817459106445' ); + t.end(); +});