Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/node_modules/@stdlib/constants/float32/e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.

-->

# E
# FLOAT32_E

> The mathematical constant [_e_][e].

Expand All @@ -27,15 +27,15 @@ limitations under the License.
## Usage

```javascript
var E = require( '@stdlib/constants/float32/e' );
var FLOAT32_E = require( '@stdlib/constants/float32/e' );
```

#### E
#### FLOAT32_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 );
var bool = ( FLOAT32_E === 2.7182817459106445 );
// returns true
```

Expand All @@ -52,9 +52,9 @@ var bool = ( E === 2.7182817459106445 );
<!-- eslint no-undef: "error" -->

```javascript
var E = require( '@stdlib/constants/float32/e' );
var FLOAT32_E = require( '@stdlib/constants/float32/e' );

console.log( E );
console.log( FLOAT32_E );
// => 2.7182817459106445
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
* Euler's number.
*
* @example
* var e = E;
* var e = FLOAT32_E;
* // returns 2.7182817459106445
*/
declare const E: number;
declare const FLOAT32_E: number;


// EXPORTS //

export = E;
export = FLOAT32_E;
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
* limitations under the License.
*/

import E = require( './index' );
import FLOAT32_E = require( './index' );


// TESTS //

// The export is a number...
{
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
E; // $ExpectType number
FLOAT32_E; // $ExpectType number
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

'use strict';

var E = require( './../lib' );
var FLOAT32_E = require( './../lib' );

console.log( E );
console.log( FLOAT32_E );
// => 2.7182817459106445
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/constants/float32/e/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
* @see [OEIS]{@link https://oeis.org/A001113}
* @see [Wikipedia]{@link https://en.wikipedia.org/wiki/E_(mathematical_constant)}
*/
var E = float64ToFloat32( 2.718281828459045 );
var FLOAT32_E = float64ToFloat32( 2.718281828459045 );


// EXPORTS //

module.exports = E;
module.exports = FLOAT32_E;
6 changes: 3 additions & 3 deletions lib/node_modules/@stdlib/constants/float32/e/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
// MODULES //

var tape = require( 'tape' );
var E = require( './../lib' );
var FLOAT32_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.strictEqual( typeof FLOAT32_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.strictEqual( E, 2.7182817459106445, 'returns expected value' );
t.strictEqual( FLOAT32_E, 2.7182817459106445, 'returns expected value' );
t.end();
});