Skip to content

Commit 3487d29

Browse files
authored
Merge branch 'stdlib-js:develop' into develop
2 parents 7c0f342 + b28f85a commit 3487d29

File tree

4,039 files changed

+86059
-84784
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,039 files changed

+86059
-84784
lines changed

docs/contributing/FAQ.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ limitations under the License.
3737
- [When should I use decimals in examples, benchmarks, and documentation, and when should I avoid them?](#decimal-usage)
3838
- [How should I name my pull request?](#pr-naming)
3939
- [How do I call the stdlib bot on my PR?](#stdlib-bot)
40+
- [Why were many unrelated files automatically pushed to my PR when I committed my changes?](#auto-push)
4041
- [Frequently used `make` commands](#freq-make-commands)
4142
- [Other Links](#other-links)
4243

@@ -290,6 +291,32 @@ Once you have created your PR, you can call the **stdlib-bot** to perform basic
290291

291292
To see other available bot commands, comment `/stdlib help` on your PR.
292293

294+
<a name="auto-push"></a>
295+
296+
## Why were many unrelated files automatically pushed to my PR when I committed my changes?
297+
298+
When you open a pull request or push changes to your feature branch, GitHub compares your feature branch against your `develop` branch and shows all the differences. If your feature branch contains outdated or extra changes, they will appear in the PR, even if they are unrelated to your work.
299+
300+
To fix this, ensure that your feature branch is based on the latest `develop` branch. You can do this by updating your local `develop` branch and then merging it into your feature branch:
301+
302+
```bash
303+
$ git checkout develop
304+
$ git pull upstream develop
305+
$ git push origin develop
306+
$ git checkout feature-branch
307+
$ git merge develop
308+
```
309+
310+
After merging, push your changes to the remote repository:
311+
312+
```bash
313+
$ git push origin feature-branch # git push also works
314+
```
315+
316+
> **Note**: When developing stdlib, we recommend using `merge` instead of `rebase` once a PR is open. Rebasing rewrites your branch history, which usually requires a force-push to update the remote branch. This can disrupt other contributors who are reviewing or collaborating on your PR. Since stdlib uses squash and merge for PRs, we don't require a clean, linear commit history. Merge commits are acceptable as long as your diff only contains relevant changes. If you want to learn more about rebasing/merging, you can refer to our [Git guide][git-guide].
317+
318+
Alternatively, you can call the **stdlib-bot** to merge changes from the `develop` branch into your PR. To do this, comment `/stdlib merge` on your PR.
319+
293320
<a name="freq-make-commands"></a>
294321

295322
## Frequently used `make` commands
@@ -355,6 +382,7 @@ For more `make` commands, refer to the [documentation][benchmark] on running ben
355382
## Other Links:
356383

357384
- [Style Guide][style-guide]
385+
- [Git Cheatsheet][git-guide]
358386
- [Other make commands][make-commands]
359387

360388
<section class="links">
@@ -367,6 +395,8 @@ For more `make` commands, refer to the [documentation][benchmark] on running ben
367395

368396
[github-fork]: https://help.github.com/articles/fork-a-repo/
369397

398+
[git-guide]: https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/git_cheatsheet.md#integration
399+
370400
[development-guide]: https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md
371401

372402
[contributing-guide]: https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md

docs/contributing/git_cheatsheet.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -452,28 +452,29 @@ Assuming you've already cloned the repository and set up your identity:
452452
453453
```bash
454454
$ git checkout develop
455-
$ git pull --ff-only upstream develop # Update local develop first
455+
$ git pull upstream develop # Update local develop first
456+
$ git push origin develop
456457
$ git checkout feature/is-even
457-
$ git rebase develop # or git merge develop
458+
$ git merge develop
458459
```
459460
460-
Resolve any conflicts with the steps mentioned earlier, then continue the rebase:
461+
Resolve any conflicts with the steps mentioned earlier, then continue the merge:
461462
462463
<!-- run-disable -->
463464
464465
```bash
465-
$ git rebase --continue
466+
$ git merge --continue
466467
```
467468
468469
Finally, push your changes:
469470
470471
<!-- run-disable -->
471472
472473
```bash
473-
$ git push --force # Force push after rebasing
474+
$ git push origin feature/is-even
474475
```
475476
476-
> **Note:** Force pushing is required after rebasing because it rewrites history. This is safe as long as you're the only one working on the branch. If you want to avoid force pushing, use merge instead of rebase.
477+
> **Note:** When developing stdlib, we recommend using `merge` instead of `rebase` once a PR is open. Rebasing rewrites your branch history, which usually requires a force-push to update the remote branch. This can disrupt other contributors who are reviewing or collaborating on your PR. Since stdlib uses squash and merge for PRs, we don't require a clean, linear commit history. Merge commits are acceptable as long as your diff only contains relevant changes.
477478
478479
8. **Repeat**: After resolving conflicts and updating your branch, you can continue making changes, committing, and pushing until your PR is ready to be merged.
479480
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"pattern": "**/package.json",
3-
"ignore": []
2+
"pattern": "**/package.json",
3+
"ignore": []
44
}

lib/node_modules/@stdlib/blas/ext/base/dsnansum/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ int main( void ) {
284284
285285
## See Also
286286
287-
- <span class="package-name">[`@stdlib/stats/base/dsnanmean`][@stdlib/stats/base/dsnanmean]</span><span class="delimiter">: </span><span class="description">calculate the arithmetic mean of a single-precision floating-point strided array, ignoring NaN values, using extended accumulation, and returning an extended precision result.</span>
287+
- <span class="package-name">[`@stdlib/stats/strided/dsnanmean`][@stdlib/stats/strided/dsnanmean]</span><span class="delimiter">: </span><span class="description">calculate the arithmetic mean of a single-precision floating-point strided array, ignoring NaN values, using extended accumulation, and returning an extended precision result.</span>
288288
- <span class="package-name">[`@stdlib/blas/ext/base/dssum`][@stdlib/blas/ext/base/dssum]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using extended accumulation and returning an extended precision result.</span>
289289
- <span class="package-name">[`@stdlib/blas/ext/base/sdsnansum`][@stdlib/blas/ext/base/sdsnansum]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements, ignoring NaN values and using extended accumulation.</span>
290290
- <span class="package-name">[`@stdlib/blas/ext/base/snansum`][@stdlib/blas/ext/base/snansum]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements, ignoring NaN values.</span>
@@ -303,7 +303,7 @@ int main( void ) {
303303
304304
<!-- <related-links> -->
305305
306-
[@stdlib/stats/base/dsnanmean]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/dsnanmean
306+
[@stdlib/stats/strided/dsnanmean]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/strided/dsnanmean
307307
308308
[@stdlib/blas/ext/base/dssum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/dssum
309309

lib/node_modules/@stdlib/blas/ext/base/dsnansumors/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ int main( void ) {
279279
280280
## See Also
281281
282-
- <span class="package-name">[`@stdlib/stats/base/dsnanmeanors`][@stdlib/stats/base/dsnanmeanors]</span><span class="delimiter">: </span><span class="description">calculate the arithmetic mean of a single-precision floating-point strided array, ignoring NaN values, using ordinary recursive summation with extended accumulation, and returning an extended precision result.</span>
282+
- <span class="package-name">[`@stdlib/stats/strided/dsnanmeanors`][@stdlib/stats/strided/dsnanmeanors]</span><span class="delimiter">: </span><span class="description">calculate the arithmetic mean of a single-precision floating-point strided array, ignoring NaN values, using ordinary recursive summation with extended accumulation, and returning an extended precision result.</span>
283283
- <span class="package-name">[`@stdlib/blas/ext/base/dssum`][@stdlib/blas/ext/base/dssum]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using extended accumulation and returning an extended precision result.</span>
284284
- <span class="package-name">[`@stdlib/blas/ext/base/dssumors`][@stdlib/blas/ext/base/dssumors]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using ordinary recursive summation with extended accumulation and returning an extended precision result.</span>
285285
- <span class="package-name">[`@stdlib/blas/ext/base/snansumors`][@stdlib/blas/ext/base/snansumors]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements, ignoring NaN values and using ordinary recursive summation.</span>
@@ -298,7 +298,7 @@ int main( void ) {
298298
299299
<!-- <related-links> -->
300300
301-
[@stdlib/stats/base/dsnanmeanors]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/dsnanmeanors
301+
[@stdlib/stats/strided/dsnanmeanors]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/strided/dsnanmeanors
302302
303303
[@stdlib/blas/ext/base/dssum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/dssum
304304

lib/node_modules/@stdlib/blas/ext/base/dssum/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ int main( void ) {
280280
- <span class="package-name">[`@stdlib/blas/ext/base/dsnansum`][@stdlib/blas/ext/base/dsnansum]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements, ignoring NaN values, using extended accumulation, and returning an extended precision result.</span>
281281
- <span class="package-name">[`@stdlib/blas/ext/base/sdssum`][@stdlib/blas/ext/base/sdssum]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using extended accumulation.</span>
282282
- <span class="package-name">[`@stdlib/blas/ext/base/ssum`][@stdlib/blas/ext/base/ssum]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements.</span>
283-
- <span class="package-name">[`@stdlib/stats/base/dsmean`][@stdlib/stats/base/dsmean]</span><span class="delimiter">: </span><span class="description">calculate the arithmetic mean of a single-precision floating-point strided array using extended accumulation and returning an extended precision result.</span>
283+
- <span class="package-name">[`@stdlib/stats/strided/dsmean`][@stdlib/stats/strided/dsmean]</span><span class="delimiter">: </span><span class="description">calculate the arithmetic mean of a single-precision floating-point strided array using extended accumulation and returning an extended precision result.</span>
284284
285285
</section>
286286
@@ -302,7 +302,7 @@ int main( void ) {
302302
303303
[@stdlib/blas/ext/base/ssum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/ssum
304304
305-
[@stdlib/stats/base/dsmean]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/dsmean
305+
[@stdlib/stats/strided/dsmean]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/strided/dsmean
306306
307307
<!-- </related-links> -->
308308
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
<!--
2+
3+
@license Apache-2.0
4+
5+
Copyright (c) 2025 The Stdlib Authors.
6+
7+
Licensed under the Apache License, Version 2.0 (the "License");
8+
you may not use this file except in compliance with the License.
9+
You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
21+
# FLOAT32_MAX_SAFE_NTH_DOUBLE_FACTORIAL
22+
23+
> Maximum safe nth [double factorial][double-factorial] when stored in [single-precision floating-point][ieee754] format.
24+
25+
<section class="usage">
26+
27+
## Usage
28+
29+
<!-- eslint-disable id-length -->
30+
31+
```javascript
32+
var FLOAT32_MAX_SAFE_NTH_DOUBLE_FACTORIAL = require( '@stdlib/constants/float32/max-safe-nth-double-factorial' );
33+
```
34+
35+
#### FLOAT32_MAX_SAFE_NTH_DOUBLE_FACTORIAL
36+
37+
The maximum [safe][safe-integers] nth [double factorial][double-factorial] when stored in [single-precision floating-point][ieee754] format.
38+
39+
<!-- eslint-disable id-length -->
40+
41+
```javascript
42+
var bool = ( FLOAT32_MAX_SAFE_NTH_DOUBLE_FACTORIAL === 56 );
43+
// returns true
44+
```
45+
46+
</section>
47+
48+
<!-- /.usage -->
49+
50+
<section class="examples">
51+
52+
## Examples
53+
54+
<!-- eslint-disable id-length -->
55+
56+
<!-- eslint no-undef: "error" -->
57+
58+
```javascript
59+
var FLOAT32_MAX_SAFE_NTH_DOUBLE_FACTORIAL = require( '@stdlib/constants/float32/max-safe-nth-double-factorial' );
60+
61+
function factorial2( n ) {
62+
var a;
63+
var i;
64+
65+
a = 1;
66+
for ( i = n; i >= 2; i -= 2 ) {
67+
a *= i;
68+
}
69+
return a;
70+
}
71+
72+
var v;
73+
var i;
74+
for ( i = 0; i < 100; i++ ) {
75+
v = factorial2( i );
76+
if ( i > FLOAT32_MAX_SAFE_NTH_DOUBLE_FACTORIAL ) {
77+
console.log( 'Unsafe: %d', v );
78+
} else {
79+
console.log( 'Safe: %d', v );
80+
}
81+
}
82+
```
83+
84+
</section>
85+
86+
<!-- /.examples -->
87+
88+
<!-- C interface documentation. -->
89+
90+
* * *
91+
92+
<section class="c">
93+
94+
## C APIs
95+
96+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
97+
98+
<section class="intro">
99+
100+
</section>
101+
102+
<!-- /.intro -->
103+
104+
<!-- C usage documentation. -->
105+
106+
<section class="usage">
107+
108+
### Usage
109+
110+
```c
111+
#include "stdlib/constants/float32/max_safe_nth_double_factorial.h"
112+
```
113+
114+
#### STDLIB_CONSTANT_FLOAT32_MAX_SAFE_NTH_DOUBLE_FACTORIAL
115+
116+
Macro for the maximum [safe][safe-integers] nth [double factorial][double-factorial] when stored in [single-precision floating-point][ieee754] format.
117+
118+
</section>
119+
120+
<!-- /.usage -->
121+
122+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
123+
124+
<section class="notes">
125+
126+
</section>
127+
128+
<!-- /.notes -->
129+
130+
<!-- C API usage examples. -->
131+
132+
<section class="examples">
133+
134+
</section>
135+
136+
<!-- /.examples -->
137+
138+
</section>
139+
140+
<!-- /.c -->
141+
142+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
143+
144+
<section class="related">
145+
146+
</section>
147+
148+
<!-- /.related -->
149+
150+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
151+
152+
<section class="links">
153+
154+
[safe-integers]: http://www.2ality.com/2013/10/safe-integers.html
155+
156+
[double-factorial]: https://en.wikipedia.org/wiki/Double_factorial
157+
158+
[ieee754]: https://en.wikipedia.org/wiki/IEEE_754-1985
159+
160+
<!-- <related-links> -->
161+
162+
<!-- </related-links> -->
163+
164+
</section>
165+
166+
<!-- /.links -->
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
{{alias}}
3+
Maximum safe nth double factorial when stored in single-precision floating-
4+
point format.
5+
6+
Examples
7+
--------
8+
> {{alias}}
9+
56
10+
11+
See Also
12+
--------
13+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
// TypeScript Version: 4.1
20+
21+
/**
22+
* Maximum safe nth double factorial when stored in single-precision floating-point format.
23+
*
24+
* @example
25+
* var max = FLOAT32_MAX_SAFE_NTH_DOUBLE_FACTORIAL;
26+
* // returns 56
27+
*/
28+
declare const FLOAT32_MAX_SAFE_NTH_DOUBLE_FACTORIAL: number;
29+
30+
31+
// EXPORTS //
32+
33+
export = FLOAT32_MAX_SAFE_NTH_DOUBLE_FACTORIAL;
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
import FLOAT32_MAX_SAFE_NTH_DOUBLE_FACTORIAL = require( './index' );
20+
21+
22+
// TESTS //
23+
24+
// The export is a number...
25+
{
26+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
27+
FLOAT32_MAX_SAFE_NTH_DOUBLE_FACTORIAL; // $ExpectType number
28+
}

0 commit comments

Comments
 (0)