Skip to content

Commit 28419dc

Browse files
committed
feat: temp commit
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
2 parents d91b4cb + b28f85a commit 28419dc

File tree

1,622 files changed

+4150
-3293
lines changed

Some content is hidden

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

1,622 files changed

+4150
-3293
lines changed

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

lib/node_modules/@stdlib/math/base/special/factorial2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ double stdlib_base_factorial2( const int32_t n );
160160
#include <stdint.h>
161161
162162
int main( void ) {
163-
const int32_t x[] = { 1, 10, 1, 301, 302 };
163+
const int32_t x[] = { 1, 10, 100, 301, 302 };
164164
165165
double b;
166166
int i;

lib/node_modules/@stdlib/math/base/special/factorial2/examples/c/example.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <stdint.h>
2222

2323
int main( void ) {
24-
const int32_t x[] = { 1, 10, 1, 301, 302 };
24+
const int32_t x[] = { 1, 10, 100, 301, 302 };
2525

2626
double b;
2727
int i;

lib/node_modules/@stdlib/math/base/special/factorial2f/test/test.native.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var tape = require( 'tape' );
25-
var isnan = require( '@stdlib/math/base/assert/is-nan' );
25+
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
2626
var incrspace = require( '@stdlib/array/base/incrspace' );
27-
var PINF = require( '@stdlib/constants/float64/pinf' );
27+
var PINF = require( '@stdlib/constants/float32/pinf' );
2828
var tryRequire = require( '@stdlib/utils/try-require' );
2929

3030

@@ -35,17 +35,17 @@ var integers = require( './fixtures/integers.json' );
3535

3636
// VARIABLES //
3737

38-
var factorial2 = tryRequire( resolve( __dirname, './../lib/native.js' ) );
38+
var factorial2f = tryRequire( resolve( __dirname, './../lib/native.js' ) );
3939
var opts = {
40-
'skip': ( factorial2 instanceof Error )
40+
'skip': ( factorial2f instanceof Error )
4141
};
4242

4343

4444
// TESTS //
4545

4646
tape( 'main export is a function', opts, function test( t ) {
4747
t.ok( true, __filename );
48-
t.strictEqual( typeof factorial2, 'function', 'main export is a function' );
48+
t.strictEqual( typeof factorial2f, 'function', 'main export is a function' );
4949
t.end();
5050
});
5151

@@ -56,8 +56,8 @@ tape( 'if provided a negative integer, the function returns `NaN`', opts, functi
5656

5757
values = incrspace( -1.0, -1000.0, -25.0 );
5858
for ( i = 0; i < values.length; i++ ) {
59-
v = factorial2( values[ i ] );
60-
t.strictEqual( isnan( v ), true, 'returns expected value when provided ' + values[ i ] );
59+
v = factorial2f( values[ i ] );
60+
t.strictEqual( isnanf( v ), true, 'returns expected value when provided ' + values[ i ] );
6161
}
6262
t.end();
6363
});
@@ -72,7 +72,7 @@ tape( 'the function evaluates the double factorial', opts, function test( t ) {
7272
expected = integers.expected;
7373

7474
for ( i = 0; i < x.length; i++ ) {
75-
v = factorial2( x[ i ] );
75+
v = factorial2f( x[ i ] );
7676
t.strictEqual( v, expected[ i ], 'returns expected value when provided ' + x[ i ] );
7777
}
7878
t.end();
@@ -81,8 +81,8 @@ tape( 'the function evaluates the double factorial', opts, function test( t ) {
8181
tape( 'if provided integers greater than `56`, the function returns `+infinity`', opts, function test( t ) {
8282
var i;
8383
var v;
84-
for ( i = 57; i < 500; i++ ) {
85-
v = factorial2( i );
84+
for ( i = 57; i < 100; i++ ) {
85+
v = factorial2f( i );
8686
t.strictEqual( v, PINF, 'returns expected value when provided ' + i );
8787
}
8888
t.end();

lib/node_modules/@stdlib/math/base/special/log1pmx/benchmark/c/benchmark.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,15 @@ static double rand_double( void ) {
9090
* @return calculated value
9191
*/
9292
double log1pmx( double x ) {
93+
double ax;
94+
9395
if ( x <= -1.0 ) {
9496
return NAN;
9597
}
96-
ax = abs( x );
98+
ax = fabs( x );
9799
if ( ax > 0.95 ) {
98-
return ln( 1.0 + x ) - x;
100+
// cppcheck-suppress unpreciseMathCall
101+
return log( 1.0 + x ) - x;
99102
}
100103
if ( ax < DBL_EPSILON ) {
101104
return -x * x / 2.0;
@@ -116,7 +119,7 @@ static double benchmark( void ) {
116119
int i;
117120

118121
for ( i = 0; i < 100; i++ ) {
119-
x[ i ] = ( 1000.0*rand_double() ) - 0.0;
122+
x[ i ] = 1000.0*rand_double();
120123
}
121124

122125
t = tic();
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
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+
# VARIABLES #
20+
21+
ifndef VERBOSE
22+
QUIET := @
23+
else
24+
QUIET :=
25+
endif
26+
27+
# Determine the OS ([1][1], [2][2]).
28+
#
29+
# [1]: https://en.wikipedia.org/wiki/Uname#Examples
30+
# [2]: http://stackoverflow.com/a/27776822/2225624
31+
OS ?= $(shell uname)
32+
ifneq (, $(findstring MINGW,$(OS)))
33+
OS := WINNT
34+
else
35+
ifneq (, $(findstring MSYS,$(OS)))
36+
OS := WINNT
37+
else
38+
ifneq (, $(findstring CYGWIN,$(OS)))
39+
OS := WINNT
40+
else
41+
ifneq (, $(findstring Windows_NT,$(OS)))
42+
OS := WINNT
43+
endif
44+
endif
45+
endif
46+
endif
47+
48+
# Define the program used for compiling C source files:
49+
ifdef C_COMPILER
50+
CC := $(C_COMPILER)
51+
else
52+
CC := gcc
53+
endif
54+
55+
# Define the command-line options when compiling C files:
56+
CFLAGS ?= \
57+
-std=c99 \
58+
-O3 \
59+
-Wall \
60+
-pedantic
61+
62+
# Determine whether to generate position independent code ([1][1], [2][2]).
63+
#
64+
# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
65+
# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
66+
ifeq ($(OS), WINNT)
67+
fPIC ?=
68+
else
69+
fPIC ?= -fPIC
70+
endif
71+
72+
# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
73+
INCLUDE ?=
74+
75+
# List of source files:
76+
SOURCE_FILES ?=
77+
78+
# List of libraries (e.g., `-lopenblas -lpthread`):
79+
LIBRARIES ?=
80+
81+
# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
82+
LIBPATH ?=
83+
84+
# List of C targets:
85+
c_targets := benchmark.out
86+
87+
88+
# RULES #
89+
90+
#/
91+
# Compiles source files.
92+
#
93+
# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
94+
# @param {string} [CFLAGS] - C compiler options
95+
# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
96+
# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
97+
# @param {string} [SOURCE_FILES] - list of source files
98+
# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
99+
# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
100+
#
101+
# @example
102+
# make
103+
#
104+
# @example
105+
# make all
106+
#/
107+
all: $(c_targets)
108+
109+
.PHONY: all
110+
111+
#/
112+
# Compiles C source files.
113+
#
114+
# @private
115+
# @param {string} CC - C compiler (e.g., `gcc`)
116+
# @param {string} CFLAGS - C compiler options
117+
# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
118+
# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
119+
# @param {string} SOURCE_FILES - list of source files
120+
# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
121+
# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
122+
#/
123+
$(c_targets): %.out: %.c
124+
$(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
125+
126+
#/
127+
# Runs compiled benchmarks.
128+
#
129+
# @example
130+
# make run
131+
#/
132+
run: $(c_targets)
133+
$(QUIET) ./$<
134+
135+
.PHONY: run
136+
137+
#/
138+
# Removes generated files.
139+
#
140+
# @example
141+
# make clean
142+
#/
143+
clean:
144+
$(QUIET) -rm -f *.o *.out
145+
146+
.PHONY: clean

0 commit comments

Comments
 (0)