Skip to content

Commit 0d837bb

Browse files
committed
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into develop
2 parents 9cf9af8 + 6db7b0b commit 0d837bb

24 files changed

Lines changed: 632 additions & 21 deletions

File tree

docs/links/database.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,17 @@
15771577
"dirname"
15781578
]
15791579
},
1580+
"https://en.wikipedia.org/wiki/E_%28mathematical_constant%29": {
1581+
"id": "eulers-number",
1582+
"description": "Wikipedia entry for the mathematical constant e.",
1583+
"short_url": "",
1584+
"keywords": [
1585+
"e",
1586+
"euler",
1587+
"napier",
1588+
"constant"
1589+
]
1590+
},
15801591
"https://en.wikipedia.org/wiki/Entropy_%28information_theory%29": {
15811592
"id": "entropy",
15821593
"description": "Wikipedia entry for the concept of entropy from information theory.",

lib/node_modules/@stdlib/math/constants/float64-apery/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var bool = ( APERY === 1.2020569031595942 );
4747
var APERY = require( '@stdlib/math/constants/float64-apery' );
4848

4949
console.log( APERY );
50-
// => 0.915965594177219
50+
// => 1.2020569031595942
5151
```
5252

5353
</section>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Natural Logarithm of 10
2+
3+
> [Natural logarithm][@stdlib/math/base/special/ln] of `10`.
4+
5+
<section class="usage">
6+
7+
## Usage
8+
9+
```javascript
10+
var LN10 = require( '@stdlib/math/constants/float64-ln-ten' );
11+
```
12+
13+
#### LN10
14+
15+
[Natural logarithm][@stdlib/math/base/special/ln] of `10`.
16+
17+
```javascript
18+
var bool = ( LN10 === 2.302585092994046 );
19+
// returns true
20+
```
21+
22+
</section>
23+
24+
<!-- /.usage -->
25+
26+
<section class="examples">
27+
28+
## Examples
29+
30+
<!-- TODO: better example -->
31+
32+
```javascript
33+
var LN10 = require( '@stdlib/math/constants/float64-ln-ten' );
34+
35+
console.log( LN10 );
36+
// => 2.302585092994046
37+
```
38+
39+
</section>
40+
41+
<!-- /.examples -->
42+
43+
<section class="links">
44+
45+
[@stdlib/math/base/special/ln]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/ln
46+
47+
</section>
48+
49+
<!-- /.links -->
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
{{alias}}
3+
Natural logarithm of `10`.
4+
5+
Examples
6+
--------
7+
> {{alias}}
8+
2.302585092994046
9+
10+
See Also
11+
--------
12+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
'use strict';
2+
3+
var LN10 = require( './../lib' );
4+
5+
console.log( LN10 );
6+
// => 2.302585092994046
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
'use strict';
2+
3+
/**
4+
* Natural logarithm of `10`.
5+
*
6+
* @module @stdlib/math/constants/float64-ln-ten
7+
* @type {number}
8+
*
9+
* @example
10+
* var LN10 = require( '@stdlib/math/constants/float64-ln-ten' );
11+
* // returns 2.302585092994046
12+
*/
13+
14+
15+
// MAIN //
16+
17+
/**
18+
* Natural logarithm of `10`.
19+
*
20+
* ``` tex
21+
* \ln 10
22+
* ```
23+
*
24+
* @constant
25+
* @type {number}
26+
* @default 2.302585092994046
27+
*/
28+
var LN10 = 2.30258509299404568401799145468436420760110148862877297603332790096757260967735248023599720508959829834196778404e+00; // eslint-disable-line max-len
29+
30+
31+
// EXPORTS //
32+
33+
module.exports = LN10;
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "@stdlib/math/constants/float64-ln-ten",
3+
"version": "0.0.0",
4+
"description": "Natural logarithm of 10.",
5+
"author": {
6+
"name": "The Stdlib Authors",
7+
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
8+
},
9+
"contributors": [
10+
{
11+
"name": "The Stdlib Authors",
12+
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
13+
}
14+
],
15+
"scripts": {},
16+
"main": "./lib",
17+
"repository": {
18+
"type": "git",
19+
"url": "git://github.com/stdlib-js/stdlib.git"
20+
},
21+
"homepage": "https://github.com/stdlib-js/stdlib",
22+
"keywords": [
23+
"stdlib",
24+
"stdmath",
25+
"constant",
26+
"const",
27+
"mathematics",
28+
"math",
29+
"ln",
30+
"ln10",
31+
"math.ln10",
32+
"natural",
33+
"logarithm",
34+
"log",
35+
"ieee754",
36+
"double",
37+
"dbl",
38+
"precision",
39+
"floating-point",
40+
"float64"
41+
],
42+
"bugs": {
43+
"url": "https://github.com/stdlib-js/stdlib/issues"
44+
},
45+
"dependencies": {},
46+
"devDependencies": {},
47+
"engines": {
48+
"node": ">=0.10.0",
49+
"npm": ">2.7.0"
50+
},
51+
"license": "Apache-2.0"
52+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
'use strict';
2+
3+
// MODULES //
4+
5+
var tape = require( 'tape' );
6+
var ln = require( '@stdlib/math/base/special/ln' );
7+
var abs = require( '@stdlib/math/base/special/abs' );
8+
var EPS = require( '@stdlib/math/constants/float64-eps' );
9+
var LN10 = require( './../lib' );
10+
11+
12+
// TESTS //
13+
14+
tape( 'main export is a number', function test( t ) {
15+
t.ok( true, __filename );
16+
t.equal( typeof LN10, 'number', 'main export is a number' );
17+
t.end();
18+
});
19+
20+
tape( 'export is a double-precision floating-point number equal to `2.302585092994046`', function test( t ) {
21+
t.equal( LN10, 2.302585092994046, 'equals 2.302585092994046' );
22+
t.end();
23+
});
24+
25+
tape( 'export equals `ln(10)`', function test( t ) {
26+
var delta;
27+
var tol;
28+
var v;
29+
30+
v = ln( 10.0 );
31+
delta = abs( v - LN10 );
32+
tol = EPS * LN10;
33+
34+
t.ok( delta <= tol, 'equals ln(10) within tolerance '+tol );
35+
t.end();
36+
});
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# LOG10E
2+
3+
> Base 10 logarithm of the mathematical constant [_e_][eulers-number].
4+
5+
<section class="usage">
6+
7+
## Usage
8+
9+
```javascript
10+
var LOG10E = require( '@stdlib/math/constants/float64-log10-e' );
11+
```
12+
13+
#### LOG10E
14+
15+
Base 10 logarithm of the mathematical constant [_e_][eulers-number].
16+
17+
```javascript
18+
var bool = ( LOG10E === 0.4342944819032518 );
19+
// returns true
20+
```
21+
22+
</section>
23+
24+
<!-- /.usage -->
25+
26+
<section class="examples">
27+
28+
## Examples
29+
30+
<!-- TODO: better example -->
31+
32+
```javascript
33+
var LOG10E = require( '@stdlib/math/constants/float64-log10-e' );
34+
35+
console.log( LOG10E );
36+
// => 0.4342944819032518
37+
```
38+
39+
</section>
40+
41+
<!-- /.examples -->
42+
43+
<section class="links">
44+
45+
[eulers-number]: https://en.wikipedia.org/wiki/E_%28mathematical_constant%29
46+
47+
</section>
48+
49+
<!-- /.links -->
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
{{alias}}
3+
Base 10 logarithm of Euler's number.
4+
5+
Examples
6+
--------
7+
> {{alias}}
8+
0.4342944819032518
9+
10+
See Also
11+
--------
12+

0 commit comments

Comments
 (0)