Skip to content

Commit 99a6cbc

Browse files
committed
Auto-generated commit
1 parent c4e19e5 commit 99a6cbc

15 files changed

Lines changed: 127 additions & 40 deletions

File tree

CHANGELOG.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4931,6 +4931,28 @@ This release closes the following issue:
49314931

49324932
<!-- /.package -->
49334933

4934+
<section class="package" id="math-base-special-factorial-unreleased">
4935+
4936+
#### [@stdlib/math/base/special/factorial](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/factorial)
4937+
4938+
<details>
4939+
4940+
<section class="bug-fixes">
4941+
4942+
##### Bug Fixes
4943+
4944+
- [`0d53bc8`](https://github.com/stdlib-js/stdlib/commit/0d53bc83d3e0bc958aa43d6bf8759e36a586b9cb) - correct imports to use `max-nth-factorial` constant
4945+
4946+
</section>
4947+
4948+
<!-- /.bug-fixes -->
4949+
4950+
</details>
4951+
4952+
</section>
4953+
4954+
<!-- /.package -->
4955+
49344956
<section class="package" id="math-base-special-factorialln-unreleased">
49354957

49364958
#### [@stdlib/math/base/special/factorialln](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/factorialln)
@@ -4969,6 +4991,16 @@ This release closes the following issue:
49694991

49704992
<!-- /.features -->
49714993

4994+
<section class="bug-fixes">
4995+
4996+
##### Bug Fixes
4997+
4998+
- [`0d53bc8`](https://github.com/stdlib-js/stdlib/commit/0d53bc83d3e0bc958aa43d6bf8759e36a586b9cb) - correct imports to use `max-nth-factorial` constant
4999+
5000+
</section>
5001+
5002+
<!-- /.bug-fixes -->
5003+
49725004
</details>
49735005

49745006
</section>
@@ -5139,6 +5171,50 @@ This release closes the following issue:
51395171

51405172
<!-- /.package -->
51415173

5174+
<section class="package" id="math-base-special-gamma-delta-ratio-unreleased">
5175+
5176+
#### [@stdlib/math/base/special/gamma-delta-ratio](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/gamma-delta-ratio)
5177+
5178+
<details>
5179+
5180+
<section class="bug-fixes">
5181+
5182+
##### Bug Fixes
5183+
5184+
- [`0d53bc8`](https://github.com/stdlib-js/stdlib/commit/0d53bc83d3e0bc958aa43d6bf8759e36a586b9cb) - correct imports to use `max-nth-factorial` constant
5185+
5186+
</section>
5187+
5188+
<!-- /.bug-fixes -->
5189+
5190+
</details>
5191+
5192+
</section>
5193+
5194+
<!-- /.package -->
5195+
5196+
<section class="package" id="math-base-special-gammainc-unreleased">
5197+
5198+
#### [@stdlib/math/base/special/gammainc](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/gammainc)
5199+
5200+
<details>
5201+
5202+
<section class="bug-fixes">
5203+
5204+
##### Bug Fixes
5205+
5206+
- [`0d53bc8`](https://github.com/stdlib-js/stdlib/commit/0d53bc83d3e0bc958aa43d6bf8759e36a586b9cb) - correct imports to use `max-nth-factorial` constant
5207+
5208+
</section>
5209+
5210+
<!-- /.bug-fixes -->
5211+
5212+
</details>
5213+
5214+
</section>
5215+
5216+
<!-- /.package -->
5217+
51425218
<section class="package" id="math-base-special-gammaln-unreleased">
51435219

51445220
#### [@stdlib/math/base/special/gammaln](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/gammaln)
@@ -6426,6 +6502,16 @@ This release closes the following issue:
64266502

64276503
<!-- /.features -->
64286504

6505+
<section class="bug-fixes">
6506+
6507+
##### Bug Fixes
6508+
6509+
- [`0d53bc8`](https://github.com/stdlib-js/stdlib/commit/0d53bc83d3e0bc958aa43d6bf8759e36a586b9cb) - correct imports to use `max-nth-factorial` constant
6510+
6511+
</section>
6512+
6513+
<!-- /.bug-fixes -->
6514+
64296515
</details>
64306516

64316517
</section>
@@ -9918,6 +10004,7 @@ A total of 32 people contributed to this release. Thank you to the following con
991810004

991910005
<details>
992010006

10007+
- [`0d53bc8`](https://github.com/stdlib-js/stdlib/commit/0d53bc83d3e0bc958aa43d6bf8759e36a586b9cb) - **fix:** correct imports to use `max-nth-factorial` constant _(by Karan Anand)_
992110008
- [`a973708`](https://github.com/stdlib-js/stdlib/commit/a973708c85ff1696483ab503201191353125b964) - **docs:** update namespace table of contents [(#6741)](https://github.com/stdlib-js/stdlib/pull/6741) _(by stdlib-bot)_
992210009
- [`9c34a77`](https://github.com/stdlib-js/stdlib/commit/9c34a77e29807a5f03506d3da65e8c34f0483f5b) - **feat:** add C implementation for `math/base/special/roundsd` [(#4438)](https://github.com/stdlib-js/stdlib/pull/4438) _(by Shabareesh Shetty, Athan Reines, stdlib-bot, Karan Anand)_
992310010
- [`d4d57c3`](https://github.com/stdlib-js/stdlib/commit/d4d57c376c6abdcaf1993d7893129b75af4f2056) - **docs:** update namespace table of contents [(#6719)](https://github.com/stdlib-js/stdlib/pull/6719) _(by stdlib-bot)_

base/special/factorial/lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var isnan = require( './../../../../base/assert/is-nan' );
2424
var isInteger = require( './../../../../base/assert/is-integer' );
2525
var gamma = require( './../../../../base/special/gamma' );
2626
var PINF = require( '@stdlib/constants/float64/pinf' );
27-
var FLOAT64_MAX_SAFE_NTH_FACTORIAL = require( '@stdlib/constants/float64/max-safe-nth-factorial' );
27+
var FLOAT64_MAX_NTH_FACTORIAL = require( '@stdlib/constants/float64/max-nth-factorial' );
2828
var FACTORIALS = require( './factorials.json' );
2929

3030

@@ -72,7 +72,7 @@ function factorial( x ) {
7272
if ( x < 0 ) {
7373
return NaN;
7474
}
75-
if ( x <= FLOAT64_MAX_SAFE_NTH_FACTORIAL ) {
75+
if ( x <= FLOAT64_MAX_NTH_FACTORIAL ) {
7676
return FACTORIALS[ x ];
7777
}
7878
return PINF;

base/special/factorial/manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@stdlib/math/base/assert/is-integer",
4242
"@stdlib/math/base/special/gamma",
4343
"@stdlib/constants/float64/pinf",
44-
"@stdlib/constants/float64/max-safe-nth-factorial"
44+
"@stdlib/constants/float64/max-nth-factorial"
4545
]
4646
},
4747
{
@@ -59,7 +59,7 @@
5959
"@stdlib/math/base/assert/is-integer",
6060
"@stdlib/math/base/special/gamma",
6161
"@stdlib/constants/float64/pinf",
62-
"@stdlib/constants/float64/max-safe-nth-factorial"
62+
"@stdlib/constants/float64/max-nth-factorial"
6363
]
6464
},
6565
{
@@ -77,7 +77,7 @@
7777
"@stdlib/math/base/assert/is-integer",
7878
"@stdlib/math/base/special/gamma",
7979
"@stdlib/constants/float64/pinf",
80-
"@stdlib/constants/float64/max-safe-nth-factorial"
80+
"@stdlib/constants/float64/max-nth-factorial"
8181
]
8282
}
8383
]

base/special/factorial/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "stdlib/math/base/assert/is_integer.h"
2222
#include "stdlib/math/base/special/gamma.h"
2323
#include "stdlib/constants/float64/pinf.h"
24-
#include "stdlib/constants/float64/max_safe_nth_factorial.h"
24+
#include "stdlib/constants/float64/max_nth_factorial.h"
2525
#include <stdint.h>
2626

2727
static const double FACTORIALS[ 171 ] = {
@@ -217,7 +217,7 @@ double stdlib_base_factorial( const double x ) {
217217
if ( x < 0.0 ) {
218218
return 0.0 / 0.0; // NaN
219219
}
220-
if ( x <= STDLIB_CONSTANT_FLOAT64_MAX_SAFE_NTH_FACTORIAL ) {
220+
if ( x <= STDLIB_CONSTANT_FLOAT64_MAX_NTH_FACTORIAL ) {
221221
return FACTORIALS[ (int32_t)x ];
222222
}
223223
return STDLIB_CONSTANT_FLOAT64_PINF;

base/special/falling-factorial/lib/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var floor = require( './../../../../base/special/floor' );
4141
var abs = require( './../../../../base/special/abs' );
4242
var FLOAT64_MAX = require( '@stdlib/constants/float64/max' );
4343
var PINF = require( '@stdlib/constants/float64/pinf' );
44-
var FLOAT64_MAX_SAFE_NTH_FACTORIAL = require( '@stdlib/constants/float64/max-safe-nth-factorial' ); // eslint-disable-line id-length
44+
var FLOAT64_MAX_NTH_FACTORIAL = require( '@stdlib/constants/float64/max-nth-factorial' );
4545

4646

4747
// FUNCTIONS //
@@ -177,10 +177,10 @@ function fallingFactorial( x, n ) {
177177
}
178178
if ( x < 0.5 ) {
179179
// Computing `1 + x` will throw away digits, so split up calculation...
180-
if ( n > FLOAT64_MAX_SAFE_NTH_FACTORIAL-2 ) {
180+
if ( n > FLOAT64_MAX_NTH_FACTORIAL-2 ) {
181181
// Given a ratio of two very large numbers, we need to split the calculation up into two blocks:
182-
t1 = x * fallingFactorial( x-1.0, FLOAT64_MAX_SAFE_NTH_FACTORIAL-2 ); // eslint-disable-line max-len
183-
t2 = fallingFactorial( x-FLOAT64_MAX_SAFE_NTH_FACTORIAL+1.0, n-FLOAT64_MAX_SAFE_NTH_FACTORIAL+1 ); // eslint-disable-line max-len
182+
t1 = x * fallingFactorial( x-1.0, FLOAT64_MAX_NTH_FACTORIAL-2 );
183+
t2 = fallingFactorial( x-FLOAT64_MAX_NTH_FACTORIAL+1.0, n-FLOAT64_MAX_NTH_FACTORIAL+1 ); // eslint-disable-line max-len
184184
if ( FLOAT64_MAX/abs(t1) < abs(t2) ) {
185185
return PINF;
186186
}

base/special/falling-factorial/manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@stdlib/math/base/special/abs",
4646
"@stdlib/constants/float64/max",
4747
"@stdlib/constants/float64/pinf",
48-
"@stdlib/constants/float64/max-safe-nth-factorial"
48+
"@stdlib/constants/float64/max-nth-factorial"
4949
]
5050
},
5151
{
@@ -67,7 +67,7 @@
6767
"@stdlib/math/base/special/abs",
6868
"@stdlib/constants/float64/max",
6969
"@stdlib/constants/float64/pinf",
70-
"@stdlib/constants/float64/max-safe-nth-factorial"
70+
"@stdlib/constants/float64/max-nth-factorial"
7171
]
7272
},
7373
{
@@ -89,7 +89,7 @@
8989
"@stdlib/math/base/special/abs",
9090
"@stdlib/constants/float64/max",
9191
"@stdlib/constants/float64/pinf",
92-
"@stdlib/constants/float64/max-safe-nth-factorial"
92+
"@stdlib/constants/float64/max-nth-factorial"
9393
]
9494
}
9595
]

base/special/falling-factorial/src/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include "stdlib/math/base/special/abs.h"
3939
#include "stdlib/constants/float64/max.h"
4040
#include "stdlib/constants/float64/pinf.h"
41-
#include "stdlib/constants/float64/max_safe_nth_factorial.h"
41+
#include "stdlib/constants/float64/max_nth_factorial.h"
4242
#include <stdint.h>
4343
#include <stdbool.h>
4444

@@ -160,10 +160,10 @@ double stdlib_base_falling_factorial( const double x, const int32_t n ) {
160160
}
161161
if ( x < 0.5 ) {
162162
// Computing `1 + x` will throw away digits, so split up calculation...
163-
if ( n > STDLIB_CONSTANT_FLOAT64_MAX_SAFE_NTH_FACTORIAL - 2 ) {
163+
if ( n > STDLIB_CONSTANT_FLOAT64_MAX_NTH_FACTORIAL - 2 ) {
164164
// Given a ratio of two very large numbers, we need to split the calculation up into two blocks:
165-
t1 = x * stdlib_base_falling_factorial( x - 1.0, STDLIB_CONSTANT_FLOAT64_MAX_SAFE_NTH_FACTORIAL - 2 );
166-
t2 = stdlib_base_falling_factorial( x - STDLIB_CONSTANT_FLOAT64_MAX_SAFE_NTH_FACTORIAL + 1.0, n - STDLIB_CONSTANT_FLOAT64_MAX_SAFE_NTH_FACTORIAL + 1 );
165+
t1 = x * stdlib_base_falling_factorial( x - 1.0, STDLIB_CONSTANT_FLOAT64_MAX_NTH_FACTORIAL - 2 );
166+
t2 = stdlib_base_falling_factorial( x - STDLIB_CONSTANT_FLOAT64_MAX_NTH_FACTORIAL + 1.0, n - STDLIB_CONSTANT_FLOAT64_MAX_NTH_FACTORIAL + 1 );
167167
if ( ( STDLIB_CONSTANT_FLOAT64_MAX / stdlib_base_abs( t1 ) ) < stdlib_base_abs( t2 ) ) {
168168
return STDLIB_CONSTANT_FLOAT64_PINF;
169169
}

base/special/gamma-delta-ratio/lib/gamma_delta_ratio_lanczos.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var pow = require( './../../../../base/special/pow' );
4545
var EPSILON = require( '@stdlib/constants/float64/eps' );
4646
var E = require( '@stdlib/constants/float64/e' );
4747
var G = require( '@stdlib/constants/float64/gamma-lanczos-g' );
48-
var MAX_FACTORIAL = require( '@stdlib/constants/float64/max-safe-nth-factorial' );
48+
var FLOAT64_MAX_NTH_FACTORIAL = require( '@stdlib/constants/float64/max-nth-factorial' );
4949

5050

5151
// VARIABLES //
@@ -80,8 +80,8 @@ function gammaDeltaRatioLanczos( z, delta ) {
8080
var zgh;
8181

8282
if ( z < EPSILON ) {
83-
if ( delta >= MAX_FACTORIAL ) {
84-
ratio = gammaDeltaRatioLanczos( delta, MAX_FACTORIAL-delta );
83+
if ( delta >= FLOAT64_MAX_NTH_FACTORIAL ) {
84+
ratio = gammaDeltaRatioLanczos( delta, FLOAT64_MAX_NTH_FACTORIAL-delta );
8585
ratio *= z;
8686
ratio *= FACTORIAL_169;
8787
return 1.0 / ratio;

base/special/gamma-delta-ratio/lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var abs = require( './../../../../base/special/abs' );
4040
var floor = require( './../../../../base/special/floor' );
4141
var gamma = require( './../../../../base/special/gamma' );
4242
var factorial = require( './../../../../base/special/factorial' );
43-
var MAX_FACTORIAL = require( '@stdlib/constants/float64/max-safe-nth-factorial' );
43+
var FLOAT64_MAX_NTH_FACTORIAL = require( '@stdlib/constants/float64/max-nth-factorial' );
4444
var gammaDeltaRatioLanczos = require( './gamma_delta_ratio_lanczos.js' );
4545

4646

@@ -87,7 +87,7 @@ function gammaDeltaRatio( z, delta ) {
8787
iz = floor( z );
8888
if ( iz === z ) {
8989
// As both `z` and `delta` are integers, see if we can use a table lookup:
90-
if ( z <= MAX_FACTORIAL && ( z + delta <= MAX_FACTORIAL ) ) {
90+
if ( z <= FLOAT64_MAX_NTH_FACTORIAL && ( z + delta <= FLOAT64_MAX_NTH_FACTORIAL ) ) {
9191
return factorial( iz - 1.0 ) / factorial( idelta + iz - 1.0 );
9292
}
9393
}

base/special/gamma-delta-ratio/manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@stdlib/math/base/special/log1p",
4646
"@stdlib/math/base/special/exp",
4747
"@stdlib/math/base/special/pow",
48-
"@stdlib/constants/float64/max-safe-nth-factorial",
48+
"@stdlib/constants/float64/max-nth-factorial",
4949
"@stdlib/constants/float64/eps",
5050
"@stdlib/constants/float64/e",
5151
"@stdlib/constants/float64/gamma-lanczos-g"
@@ -70,7 +70,7 @@
7070
"@stdlib/math/base/special/log1p",
7171
"@stdlib/math/base/special/exp",
7272
"@stdlib/math/base/special/pow",
73-
"@stdlib/constants/float64/max-safe-nth-factorial",
73+
"@stdlib/constants/float64/max-nth-factorial",
7474
"@stdlib/constants/float64/eps",
7575
"@stdlib/constants/float64/e",
7676
"@stdlib/constants/float64/gamma-lanczos-g"
@@ -95,7 +95,7 @@
9595
"@stdlib/math/base/special/log1p",
9696
"@stdlib/math/base/special/exp",
9797
"@stdlib/math/base/special/pow",
98-
"@stdlib/constants/float64/max-safe-nth-factorial",
98+
"@stdlib/constants/float64/max-nth-factorial",
9999
"@stdlib/constants/float64/eps",
100100
"@stdlib/constants/float64/e",
101101
"@stdlib/constants/float64/gamma-lanczos-g"

0 commit comments

Comments
 (0)