Skip to content

Commit 66ea937

Browse files
committedDec 31, 2024
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into develop
2 parents 8d7f8e2 + 4301694 commit 66ea937

File tree

22 files changed

+668
-53
lines changed

22 files changed

+668
-53
lines changed
 

Diff for: ‎.github/workflows/scripts/add_trailing_newlines

+13-7
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ set -o pipefail
3333
# VARIABLES #
3434

3535
# List of file extensions to process:
36-
extensions=("js" "mjs" "cjs" "json" "ts" "py" "jl" "R" "c" "h" "cpp" "hpp" "f" "sh" "awk" "html" "xml" "css" "md" "yml" "gypi" "bib" "tex")
36+
extensions=("js" "mjs" "cjs" "json" "ts" "py" "jl" "R" "c" "h" "cpp" "hpp" "f" "sh" "awk" "html" "xml" "css" "md" "yml" "gyp" "gypi" "bib" "tex" "mk")
3737

3838

3939
# FUNCTIONS #
@@ -70,13 +70,19 @@ main() {
7070
convert_line_endings "$file"
7171

7272
extension="${file##*.}"
73+
filename=$(basename "$file")
74+
7375
local match_found=false
74-
for ext in "${extensions[@]}"; do
75-
if [[ "$ext" == "$extension" ]]; then
76-
match_found=true
77-
break
78-
fi
79-
done
76+
if [[ "$filename" == "Makefile" ]]; then
77+
match_found=true
78+
elif [[ "$file" == *.* ]]; then
79+
for ext in "${extensions[@]}"; do
80+
if [[ "$ext" == "$extension" ]]; then
81+
match_found=true
82+
break
83+
fi
84+
done
85+
fi
8086
if [[ "$match_found" == true ]]; then
8187
if [[ "$(tail -c1 "$file"; echo x)" != $'\nx' ]]; then
8288
echo "Adding newline to: $file"

Diff for: ‎lib/node_modules/@stdlib/constants/float32/README.md

+90
Large diffs are not rendered by default.

Diff for: ‎lib/node_modules/@stdlib/constants/float32/docs/types/index.d.ts

+300
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,52 @@
2222

2323
import ABS_MASK = require( '@stdlib/constants/float32/abs-mask' );
2424
import CBRT_EPS = require( '@stdlib/constants/float32/cbrt-eps' );
25+
import E = require( '@stdlib/constants/float32/e' );
2526
import EPS = require( '@stdlib/constants/float32/eps' );
2627
import EXPONENT_BIAS = require( '@stdlib/constants/float32/exponent-bias' );
2728
import EXPONENT_MASK = require( '@stdlib/constants/float32/exponent-mask' );
29+
import FOURTH_PI = require( '@stdlib/constants/float32/fourth-pi' );
30+
import HALF_LN_TWO = require( '@stdlib/constants/float32/half-ln-two' );
31+
import HALF_PI = require( '@stdlib/constants/float32/half-pi' );
32+
import LN_HALF = require( '@stdlib/constants/float32/ln-half' );
33+
import LN_PI = require( '@stdlib/constants/float32/ln-pi' );
34+
import LN_TEN = require( '@stdlib/constants/float32/ln-ten' );
35+
import LN_TWO = require( '@stdlib/constants/float32/ln-two' );
2836
import MAX = require( '@stdlib/constants/float32/max' );
37+
import MAX_BASE2_EXPONENT = require( '@stdlib/constants/float32/max-base2-exponent' );
38+
import MAX_BASE2_EXPONENT_SUBNORMAL = require( '@stdlib/constants/float32/max-base2-exponent-subnormal' );
39+
import MAX_BASE10_EXPONENT = require( '@stdlib/constants/float32/max-base10-exponent' );
40+
import MAX_BASE10_EXPONENT_SUBNORMAL = require( '@stdlib/constants/float32/max-base10-exponent-subnormal' );
41+
import MAX_SAFE_FIBONACCI = require( '@stdlib/constants/float32/max-safe-fibonacci' );
2942
import MAX_SAFE_INTEGER = require( '@stdlib/constants/float32/max-safe-integer' );
43+
import MAX_SAFE_NTH_FACTORIAL = require( '@stdlib/constants/float32/max-safe-nth-factorial' );
44+
import MAX_SAFE_NTH_FIBONACCI = require( '@stdlib/constants/float32/max-safe-nth-fibonacci' );
45+
import MAX_SAFE_NTH_LUCAS = require( '@stdlib/constants/float32/max-safe-nth-lucas' );
46+
import MIN_BASE2_EXPONENT = require( '@stdlib/constants/float32/min-base2-exponent' );
47+
import MIN_BASE2_EXPONENT_SUBNORMAL = require( '@stdlib/constants/float32/min-base2-exponent-subnormal' );
48+
import MIN_BASE10_EXPONENT = require( '@stdlib/constants/float32/min-base10-exponent' );
49+
import MIN_BASE10_EXPONENT_SUBNORMAL = require( '@stdlib/constants/float32/min-base10-exponent-subnormal' );
3050
import MIN_SAFE_INTEGER = require( '@stdlib/constants/float32/min-safe-integer' );
3151
import NAN = require( '@stdlib/constants/float32/nan' );
3252
import NINF = require( '@stdlib/constants/float32/ninf' );
3353
import NUM_BYTES = require( '@stdlib/constants/float32/num-bytes' );
54+
import PHI = require( '@stdlib/constants/float32/phi' );
55+
import PI = require( '@stdlib/constants/float32/pi' );
3456
import PINF = require( '@stdlib/constants/float32/pinf' );
3557
import PRECISION = require( '@stdlib/constants/float32/precision' );
3658
import SIGN_MASK = require( '@stdlib/constants/float32/sign-mask' );
3759
import SIGNIFICAND_MASK = require( '@stdlib/constants/float32/significand-mask' );
3860
import SMALLEST_NORMAL = require( '@stdlib/constants/float32/smallest-normal' );
3961
import SMALLEST_SUBNORMAL = require( '@stdlib/constants/float32/smallest-subnormal' );
4062
import SQRT_EPS = require( '@stdlib/constants/float32/sqrt-eps' );
63+
import SQRT_HALF = require( '@stdlib/constants/float32/sqrt-half' );
64+
import SQRT_HALF_PI = require( '@stdlib/constants/float32/sqrt-half-pi' );
65+
import SQRT_PHI = require( '@stdlib/constants/float32/sqrt-phi' );
66+
import SQRT_PI = require( '@stdlib/constants/float32/sqrt-pi' );
67+
import SQRT_THREE = require( '@stdlib/constants/float32/sqrt-three' );
68+
import SQRT_TWO = require( '@stdlib/constants/float32/sqrt-two' );
69+
import SQRT_TWO_PI = require( '@stdlib/constants/float32/sqrt-two-pi' );
70+
import TWO_PI = require( '@stdlib/constants/float32/two-pi' );
4171

4272
/**
4373
* Interface describing the `float32` namespace.
@@ -61,6 +91,15 @@ interface Namespace {
6191
*/
6292
CBRT_EPS: typeof CBRT_EPS;
6393

94+
/**
95+
* Euler's number.
96+
*
97+
* @example
98+
* var e = ns.E;
99+
* // returns 2.7182817459106445
100+
*/
101+
E: typeof E;
102+
64103
/**
65104
* Difference between one and the smallest value greater than one that can be represented as a single-precision floating-point number.
66105
*
@@ -88,6 +127,69 @@ interface Namespace {
88127
*/
89128
EXPONENT_MASK: typeof EXPONENT_MASK;
90129

130+
/**
131+
* One fourth times the mathematical constant `π`.
132+
*
133+
* @example
134+
* var val = ns.FOURTH_PI;
135+
* // returns 7.853981852531433e-1
136+
*/
137+
FOURTH_PI: typeof FOURTH_PI;
138+
139+
/**
140+
* One half times the natural logarithm of 2 as a single-precision floating-point number.
141+
*
142+
* @example
143+
* var val = ns.HALF_LN_TWO;
144+
* // returns 0.3465735912322998
145+
*/
146+
HALF_LN_TWO: typeof HALF_LN_TWO;
147+
148+
/**
149+
* One half times the mathematical constant `π`.
150+
*
151+
* @example
152+
* var val = ns.HALF_PI;
153+
* // returns 1.5707963705062866
154+
*/
155+
HALF_PI: typeof HALF_PI;
156+
157+
/**
158+
* Natural logarithm of `1/2` as a single-precision floating-point number.
159+
*
160+
* @example
161+
* var val = ns.LN_HALF;
162+
* // returns -0.6931471824645996
163+
*/
164+
LN_HALF: typeof LN_HALF;
165+
166+
/**
167+
* Natural logarithm of the mathematical constant `π` as a single-precision floating-point number.
168+
*
169+
* @example
170+
* var val = ns.LN_PI;
171+
* // returns 1.1447298526763916
172+
*/
173+
LN_PI: typeof LN_PI;
174+
175+
/**
176+
* Natural logarithm of `10` as a single-precision floating-point number.
177+
*
178+
* @example
179+
* var val = ns.LN_TEN;
180+
* // returns 2.3025851249694824
181+
*/
182+
LN_TEN: typeof LN_TEN;
183+
184+
/**
185+
* Natural logarithm of `2` as a single-precision floating-point number.
186+
*
187+
* @example
188+
* var val = ns.LN_TWO;
189+
* // returns 0.6931471824645996
190+
*/
191+
LN_TWO: typeof LN_TWO;
192+
91193
/**
92194
* Maximum single-precision floating-point number.
93195
*
@@ -97,6 +199,51 @@ interface Namespace {
97199
*/
98200
MAX: typeof MAX;
99201

202+
/**
203+
* The maximum biased base 2 exponent for a single-precision floating-point number.
204+
*
205+
* @example
206+
* var exp = ns.MAX_BASE2_EXPONENT;
207+
* // returns 127
208+
*/
209+
MAX_BASE2_EXPONENT: typeof MAX_BASE2_EXPONENT;
210+
211+
/**
212+
* The maximum biased base 2 exponent for a subnormal single-precision floating-point number.
213+
*
214+
* @example
215+
* var exp = ns.MAX_BASE2_EXPONENT_SUBNORMAL;
216+
* // returns -127
217+
*/
218+
MAX_BASE2_EXPONENT_SUBNORMAL: typeof MAX_BASE2_EXPONENT_SUBNORMAL;
219+
220+
/**
221+
* The maximum base 10 exponent for a single-precision floating-point number.
222+
*
223+
* @example
224+
* var exp = ns.MAX_BASE10_EXPONENT;
225+
* // returns 38
226+
*/
227+
MAX_BASE10_EXPONENT: typeof MAX_BASE10_EXPONENT;
228+
229+
/**
230+
* The maximum base 10 exponent for a subnormal single-precision floating-point number.
231+
*
232+
* @example
233+
* var exp = ns.MAX_BASE10_EXPONENT_SUBNORMAL;
234+
* // returns -38
235+
*/
236+
MAX_BASE10_EXPONENT_SUBNORMAL: typeof MAX_BASE10_EXPONENT_SUBNORMAL;
237+
238+
/**
239+
* Maximum safe Fibonacci number when stored in single-precision floating-point format.
240+
*
241+
* @example
242+
* var max = ns.MAX_SAFE_FIBONACCI;
243+
* // returns 14930352
244+
*/
245+
MAX_SAFE_FIBONACCI: typeof MAX_SAFE_FIBONACCI;
246+
100247
/**
101248
* Maximum safe single-precision floating-point integer.
102249
*
@@ -106,6 +253,69 @@ interface Namespace {
106253
*/
107254
MAX_SAFE_INTEGER: typeof MAX_SAFE_INTEGER;
108255

256+
/**
257+
* Maximum safe nth factorial when stored in single-precision floating-point format.
258+
*
259+
* @example
260+
* var max = ns.MAX_SAFE_NTH_FACTORIAL;
261+
* // returns 34
262+
*/
263+
MAX_SAFE_NTH_FACTORIAL: typeof MAX_SAFE_NTH_FACTORIAL;
264+
265+
/**
266+
* Maximum safe nth Fibonacci number when stored in single-precision floating-point format.
267+
*
268+
* @example
269+
* var max = ns.MAX_SAFE_NTH_FIBONACCI;
270+
* // returns 36
271+
*/
272+
MAX_SAFE_NTH_FIBONACCI: typeof MAX_SAFE_NTH_FIBONACCI;
273+
274+
/**
275+
* Maximum safe nth Lucas number when stored in single-precision floating-point format.
276+
*
277+
* @example
278+
* var max = ns.MAX_SAFE_NTH_LUCAS;
279+
* // returns 34
280+
*/
281+
MAX_SAFE_NTH_LUCAS: typeof MAX_SAFE_NTH_LUCAS;
282+
283+
/**
284+
* The minimum biased base 2 exponent for a normal single-precision floating-point number.
285+
*
286+
* @example
287+
* var min = ns.MIN_BASE2_EXPONENT;
288+
* // returns -126
289+
*/
290+
MIN_BASE2_EXPONENT: typeof MIN_BASE2_EXPONENT;
291+
292+
/**
293+
* The minimum biased base 2 exponent for a subnormal single-precision floating-point number.
294+
*
295+
* @example
296+
* var min = ns.MIN_BASE2_EXPONENT_SUBNORMAL;
297+
* // returns -149
298+
*/
299+
MIN_BASE2_EXPONENT_SUBNORMAL: typeof MIN_BASE2_EXPONENT_SUBNORMAL;
300+
301+
/**
302+
* The minimum base 10 exponent for a normal single-precision floating-point number.
303+
*
304+
* @example
305+
* var min = ns.MIN_BASE10_EXPONENT;
306+
* // returns -37
307+
*/
308+
MIN_BASE10_EXPONENT: typeof MIN_BASE10_EXPONENT;
309+
310+
/**
311+
* The minimum base 10 exponent for a subnormal single-precision floating-point number.
312+
*
313+
* @example
314+
* var min = ns.MIN_BASE10_EXPONENT_SUBNORMAL;
315+
* // returns -45
316+
*/
317+
MIN_BASE10_EXPONENT_SUBNORMAL: typeof MIN_BASE10_EXPONENT_SUBNORMAL;
318+
109319
/**
110320
* Minimum safe single-precision floating-point integer.
111321
*
@@ -142,6 +352,24 @@ interface Namespace {
142352
*/
143353
NUM_BYTES: typeof NUM_BYTES;
144354

355+
/**
356+
* Golden ratio.
357+
*
358+
* @example
359+
* var val = ns.PHI;
360+
* // returns 1.6180340051651
361+
*/
362+
PHI: typeof PHI;
363+
364+
/**
365+
* The mathematical constant `π`.
366+
*
367+
* @example
368+
* var val = ns.PI;
369+
* // returns 3.1415927410125732
370+
*/
371+
PI: typeof PI;
372+
145373
/**
146374
* Single-precision floating-point positive infinity.
147375
*
@@ -204,6 +432,78 @@ interface Namespace {
204432
* // returns 0.0003452669770922512
205433
*/
206434
SQRT_EPS: typeof SQRT_EPS;
435+
436+
/**
437+
* Square root of `1/2` as a single-precision floating-point number.
438+
*
439+
* @example
440+
* var val = ns.SQRT_HALF;
441+
* // returns 0.7071067690849304
442+
*/
443+
SQRT_HALF: typeof SQRT_HALF;
444+
445+
/**
446+
* Square root of the mathematical constant `π` divided by `2` as a single-precision floating-point number.
447+
*
448+
* @example
449+
* var val = ns.SQRT_HALF_PI;
450+
* // returns 1.2533141374588013
451+
*/
452+
SQRT_HALF_PI: typeof SQRT_HALF_PI;
453+
454+
/**
455+
* Square root of the golden ratio as a single-precision floating-point number.
456+
*
457+
* @example
458+
* var val = ns.SQRT_PHI;
459+
* // returns 1.272019624710083
460+
*/
461+
SQRT_PHI: typeof SQRT_PHI;
462+
463+
/**
464+
* Square root of the mathematical constant `π` as a single-precision floating-point number.
465+
*
466+
* @example
467+
* var val = ns.SQRT_PI;
468+
* // returns 1.7724539041519165
469+
*/
470+
SQRT_PI: typeof SQRT_PI;
471+
472+
/**
473+
* Square root of `3` as a single-precision floating-point number.
474+
*
475+
* @example
476+
* var val = ns.SQRT_THREE;
477+
* // returns 1.7320507764816284
478+
*/
479+
SQRT_THREE: typeof SQRT_THREE;
480+
481+
/**
482+
* Square root of `2` as a single-precision floating-point number.
483+
*
484+
* @example
485+
* var val = ns.SQRT_TWO;
486+
* // returns 1.4142135381698608
487+
*/
488+
SQRT_TWO: typeof SQRT_TWO;
489+
490+
/**
491+
* Square root of the mathematical constant `π` times `2` as a single-precision floating-point number.
492+
*
493+
* @example
494+
* var val = ns.SQRT_TWO_PI;
495+
* // returns 2.5066282749176025
496+
*/
497+
SQRT_TWO_PI: typeof SQRT_TWO_PI;
498+
499+
/**
500+
* The mathematical constant `π` times `2`.
501+
*
502+
* @example
503+
* var val = ns.TWO_PI;
504+
* // returns 6.2831854820251465
505+
*/
506+
TWO_PI: typeof TWO_PI;
207507
}
208508

209509
/**

0 commit comments

Comments
 (0)