Skip to content

Commit b80419f

Browse files
committed
Merge branch 'develop' into feat/lanczos-sum
2 parents 3fc21ed + 9a41c60 commit b80419f

Some content is hidden

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

71 files changed

+801
-869
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ var o = ns;
4444
<div class="namespace-toc">
4545

4646
- <span class="signature">[`cfill( N, alpha, x, strideX )`][@stdlib/blas/ext/base/cfill]</span><span class="delimiter">: </span><span class="description">fill a single-precision complex floating-point strided array with a specified scalar constant.</span>
47+
- <span class="signature">[`csum( N, x, strideX )`][@stdlib/blas/ext/base/csum]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision complex floating-point strided array elements.</span>
48+
- <span class="signature">[`csumkbn( N, x, strideX )`][@stdlib/blas/ext/base/csumkbn]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision complex floating-point strided array elements using an improved Kahan–Babuška algorithm.</span>
4749
- <span class="signature">[`dapx( N, alpha, x, strideX )`][@stdlib/blas/ext/base/dapx]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each element in a double-precision floating-point strided array.</span>
4850
- <span class="signature">[`dapxsum( N, alpha, x, strideX )`][@stdlib/blas/ext/base/dapxsum]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each double-precision floating-point strided array element and compute the sum.</span>
4951
- <span class="signature">[`dapxsumkbn( N, alpha, x, strideX )`][@stdlib/blas/ext/base/dapxsumkbn]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each double-precision floating-point strided array element and compute the sum using an improved Kahan–Babuška algorithm.</span>
@@ -105,6 +107,7 @@ var o = ns;
105107
- <span class="signature">[`gfillBy( N, x, strideX, clbk[, thisArg] )`][@stdlib/blas/ext/base/gfill-by]</span><span class="delimiter">: </span><span class="description">fill a strided array according to a provided callback function.</span>
106108
- <span class="signature">[`gfill( N, alpha, x, strideX )`][@stdlib/blas/ext/base/gfill]</span><span class="delimiter">: </span><span class="description">fill a strided array with a specified scalar constant.</span>
107109
- <span class="signature">[`gnannsumkbn( N, x, strideX, out, strideOut )`][@stdlib/blas/ext/base/gnannsumkbn]</span><span class="delimiter">: </span><span class="description">calculate the sum of strided array elements, ignoring `NaN` values and using an improved Kahan–Babuška algorithm.</span>
110+
- <span class="signature">[`gnannsumpw( N, x, strideX, out, strideOut )`][@stdlib/blas/ext/base/gnannsumpw]</span><span class="delimiter">: </span><span class="description">calculate the sum of strided array elements, ignoring `NaN` values and using pairwise summation.</span>
108111
- <span class="signature">[`gnansum( N, x, strideX )`][@stdlib/blas/ext/base/gnansum]</span><span class="delimiter">: </span><span class="description">calculate the sum of strided array elements, ignoring `NaN` values.</span>
109112
- <span class="signature">[`gnansumkbn( N, x, strideX )`][@stdlib/blas/ext/base/gnansumkbn]</span><span class="delimiter">: </span><span class="description">calculate the sum of strided array elements, ignoring `NaN` values and using an improved Kahan–Babuška algorithm.</span>
110113
- <span class="signature">[`gnansumkbn2( N, x, strideX )`][@stdlib/blas/ext/base/gnansumkbn2]</span><span class="delimiter">: </span><span class="description">calculate the sum of strided array elements, ignoring `NaN` values and using a second-order iterative Kahan–Babuška algorithm.</span>
@@ -161,6 +164,8 @@ var o = ns;
161164
- <span class="signature">[`ssumpw( N, x, strideX )`][@stdlib/blas/ext/base/ssumpw]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using pairwise summation.</span>
162165
- <span class="signature">[`wasm`][@stdlib/blas/ext/base/wasm]</span><span class="delimiter">: </span><span class="description">extensions to basic linear algebra subprograms (BLAS) compiled to WebAssembly.</span>
163166
- <span class="signature">[`zfill( N, alpha, x, strideX )`][@stdlib/blas/ext/base/zfill]</span><span class="delimiter">: </span><span class="description">fill a double-precision complex floating-point strided array with a specified scalar constant.</span>
167+
- <span class="signature">[`zsum( N, x, strideX )`][@stdlib/blas/ext/base/zsum]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision complex floating-point strided array elements.</span>
168+
- <span class="signature">[`zsumkbn( N, x, strideX )`][@stdlib/blas/ext/base/zsumkbn]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision complex floating-point strided array elements using an improved Kahan–Babuška algorithm.</span>
164169

165170
</div>
166171

@@ -213,6 +218,10 @@ console.log( objectKeys( ns ) );
213218

214219
[@stdlib/blas/ext/base/cfill]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/cfill
215220

221+
[@stdlib/blas/ext/base/csum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/csum
222+
223+
[@stdlib/blas/ext/base/csumkbn]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/csumkbn
224+
216225
[@stdlib/blas/ext/base/dapx]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/dapx
217226

218227
[@stdlib/blas/ext/base/dapxsum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/dapxsum
@@ -335,6 +344,8 @@ console.log( objectKeys( ns ) );
335344

336345
[@stdlib/blas/ext/base/gnannsumkbn]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/gnannsumkbn
337346

347+
[@stdlib/blas/ext/base/gnannsumpw]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/gnannsumpw
348+
338349
[@stdlib/blas/ext/base/gnansum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/gnansum
339350

340351
[@stdlib/blas/ext/base/gnansumkbn]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/gnansumkbn
@@ -447,6 +458,10 @@ console.log( objectKeys( ns ) );
447458

448459
[@stdlib/blas/ext/base/zfill]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/zfill
449460

461+
[@stdlib/blas/ext/base/zsum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/zsum
462+
463+
[@stdlib/blas/ext/base/zsumkbn]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/zsumkbn
464+
450465
<!-- </toc-links> -->
451466

452467
</section>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ The namespace exposes the following APIs:
4545

4646
<div class="namespace-toc">
4747

48+
- <span class="signature">[`csum( arrays )`][@stdlib/blas/ext/base/ndarray/csum]</span><span class="delimiter">: </span><span class="description">compute the sum of all elements in a one-dimensional single-precision complex floating-point ndarray.</span>
4849
- <span class="signature">[`dcusum( arrays )`][@stdlib/blas/ext/base/ndarray/dcusum]</span><span class="delimiter">: </span><span class="description">compute the cumulative sum of a one-dimensional double-precision floating-point ndarray.</span>
4950
- <span class="signature">[`dsum( arrays )`][@stdlib/blas/ext/base/ndarray/dsum]</span><span class="delimiter">: </span><span class="description">compute the sum of all elements in a one-dimensional double-precision floating-point ndarray.</span>
5051
- <span class="signature">[`gcusum( arrays )`][@stdlib/blas/ext/base/ndarray/gcusum]</span><span class="delimiter">: </span><span class="description">compute the cumulative sum of a one-dimensional ndarray.</span>
5152
- <span class="signature">[`gsum( arrays )`][@stdlib/blas/ext/base/ndarray/gsum]</span><span class="delimiter">: </span><span class="description">compute the sum of all elements in a one-dimensional ndarray.</span>
5253
- <span class="signature">[`scusum( arrays )`][@stdlib/blas/ext/base/ndarray/scusum]</span><span class="delimiter">: </span><span class="description">compute the cumulative sum of a one-dimensional single-precision floating-point ndarray.</span>
5354
- <span class="signature">[`ssum( arrays )`][@stdlib/blas/ext/base/ndarray/ssum]</span><span class="delimiter">: </span><span class="description">compute the sum of all elements in a one-dimensional single-precision floating-point ndarray.</span>
55+
- <span class="signature">[`zsum( arrays )`][@stdlib/blas/ext/base/ndarray/zsum]</span><span class="delimiter">: </span><span class="description">compute the sum of all elements in a one-dimensional double-precision complex floating-point ndarray.</span>
5456

5557
</div>
5658

@@ -93,6 +95,8 @@ console.log( objectKeys( ns ) );
9395

9496
<!-- <toc-links> -->
9597

98+
[@stdlib/blas/ext/base/ndarray/csum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/ndarray/csum
99+
96100
[@stdlib/blas/ext/base/ndarray/dcusum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/ndarray/dcusum
97101

98102
[@stdlib/blas/ext/base/ndarray/dsum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/ndarray/dsum
@@ -105,6 +109,8 @@ console.log( objectKeys( ns ) );
105109

106110
[@stdlib/blas/ext/base/ndarray/ssum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/ndarray/ssum
107111

112+
[@stdlib/blas/ext/base/ndarray/zsum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/ndarray/zsum
113+
108114
<!-- </toc-links> -->
109115

110116
</section>

lib/node_modules/@stdlib/constants/float32/gamma-lanczos-g/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var FLOAT32_GAMMA_LANCZOS_G = require( '@stdlib/constants/float32/gamma-lanczos-
4141
Arbitrary constant `g` to be used in [Lanczos approximation][lanczos-approximation] functions.
4242

4343
```javascript
44-
var bool = ( FLOAT32_GAMMA_LANCZOS_G === 10.900510787963867 );
44+
var bool = ( FLOAT32_GAMMA_LANCZOS_G === 1.42845618724823 );
4545
// returns true
4646
```
4747

@@ -59,7 +59,7 @@ var bool = ( FLOAT32_GAMMA_LANCZOS_G === 10.900510787963867 );
5959
var FLOAT32_GAMMA_LANCZOS_G = require( '@stdlib/constants/float32/gamma-lanczos-g' );
6060

6161
console.log( FLOAT32_GAMMA_LANCZOS_G );
62-
// => 10.900510787963867
62+
// => 1.42845618724823
6363
```
6464

6565
</section>
@@ -126,7 +126,7 @@ Macro for the arbitrary constant `g` to be used in [Lanczos approximation][lancz
126126

127127
## References
128128

129-
- Pugh, Glendon R. 2004. "An analysis of the Lanczos gamma approximation." PhD thesis, University of British Columbia. [&lt;https://web.viu.ca/pughg/phdThesis/phdThesis.pdf>][@pugh:2004a].
129+
- Boost C++ Libraries. "The Lanczos Approximation." [https://beta.boost.org/doc/libs/1_82_0/libs/math/doc/html/math_toolkit/lanczos.html][@boost:lanczos].
130130

131131
</section>
132132

@@ -146,7 +146,7 @@ Macro for the arbitrary constant `g` to be used in [Lanczos approximation][lancz
146146

147147
[lanczos-approximation]: https://en.wikipedia.org/wiki/Lanczos_approximation
148148

149-
[@pugh:2004a]: https://web.viu.ca/pughg/phdThesis/phdThesis.pdf
149+
[@boost:lanczos]: https://beta.boost.org/doc/libs/1_82_0/libs/math/doc/html/math_toolkit/lanczos.html
150150

151151
</section>
152152

lib/node_modules/@stdlib/constants/float32/gamma-lanczos-g/docs/repl.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Examples
66
--------
77
> {{alias}}
8-
10.900510787963867
8+
1.42845618724823
99

1010
See Also
1111
--------

lib/node_modules/@stdlib/constants/float32/gamma-lanczos-g/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
* @example
2525
* var g = FLOAT32_GAMMA_LANCZOS_G;
26-
* // returns 10.900510787963867
26+
* // returns 1.42845618724823
2727
*/
2828
declare const FLOAT32_GAMMA_LANCZOS_G: number;
2929

lib/node_modules/@stdlib/constants/float32/gamma-lanczos-g/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
var FLOAT32_GAMMA_LANCZOS_G = require( './../lib' );
2222

2323
console.log( FLOAT32_GAMMA_LANCZOS_G );
24-
// => 10.900510787963867
24+
// => 1.42845618724823

lib/node_modules/@stdlib/constants/float32/gamma-lanczos-g/include/stdlib/constants/float32/gamma_lanczos_g.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
/**
2323
* Macro for the arbitrary constant `g` to be used in Lanczos approximation functions.
2424
*/
25-
#define STDLIB_CONSTANT_FLOAT32_GAMMA_LANCZOS_G 10.900511f
25+
#define STDLIB_CONSTANT_FLOAT32_GAMMA_LANCZOS_G 1.428456135094165802001953125f
2626

2727
#endif // !STDLIB_CONSTANTS_FLOAT32_GAMMA_LANCZOS_G_H

lib/node_modules/@stdlib/constants/float32/gamma-lanczos-g/lib/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* @example
2828
* var FLOAT32_GAMMA_LANCZOS_G = require( '@stdlib/constants/float32/gamma-lanczos-g' );
29-
* // returns 10.900510787963867
29+
* // returns 1.42845618724823
3030
*/
3131

3232
// MODULES //
@@ -41,10 +41,10 @@ var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
4141
*
4242
* @constant
4343
* @type {number}
44-
* @default 10.900510787963867
44+
* @default 1.42845618724823
4545
* @see [Lanczos Approximation]{@link https://en.wikipedia.org/wiki/Lanczos_approximation}
4646
*/
47-
var FLOAT32_GAMMA_LANCZOS_G = float64ToFloat32( 10.900511 );
47+
var FLOAT32_GAMMA_LANCZOS_G = float64ToFloat32( 1.428456135094165802001953125 );
4848

4949

5050
// EXPORTS //

lib/node_modules/@stdlib/constants/float32/gamma-lanczos-g/test/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ tape( 'main export is a number', function test( t ) {
3232
t.end();
3333
});
3434

35-
tape( 'the exported value equals `10.900510787963867`', function test( t ) {
36-
var expected = 10.900510787963867;
35+
tape( 'the exported value equals `1.42845618724823`', function test( t ) {
36+
var expected = 1.42845618724823;
3737
t.strictEqual( FLOAT32_GAMMA_LANCZOS_G, expected, 'returns expected value' );
3838
t.end();
3939
});

lib/node_modules/@stdlib/repl/code-blocks/data/data.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1850,7 +1850,7 @@ base.strided.dnannsumkbn2.ndarray,"var x = new Float64Array( [ 1.0, -2.0, NaN, 2
18501850
base.strided.dnannsumors,"var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\nvar out = new Float64Array( 2 );\nbase.strided.dnannsumors( x.length, x, 1, out, 1 )\nx = new Float64Array( [ -2.0, 1.0, 1.0, -5.0, 2.0, -1.0, NaN, NaN ] );\nout = new Float64Array( 2 );\nbase.strided.dnannsumors( 4, x, 2, out, 1 )\nvar x0 = new Float64Array( [ 1.0, -2.0, 3.0, 2.0, 5.0, 1.0, NaN, NaN ] );\nvar x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 );\nout = new Float64Array( 2 );\nbase.strided.dnannsumors( 4, x1, 2, out, 1 )\n"
18511851
base.strided.dnannsumors.ndarray,"var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\nvar out = new Float64Array( 2 );\nbase.strided.dnannsumors.ndarray( x.length, x, 1, 0, out, 1, 0 )\nvar x = new Float64Array( [ 1.0, -2.0, 3.0, 2.0, 5.0, 1.0, NaN, NaN ] );\nout = new Float64Array( 2 );\nbase.strided.dnannsumors.ndarray( 4, x, 2, 1, out, 1, 0 )\n"
18521852
base.strided.dnannsumpw,"var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\nvar out = new Float64Array( 2 );\nbase.strided.dnannsumpw( x.length, x, 1, out, 1 )\nx = new Float64Array( [ -2.0, 1.0, 1.0, -5.0, 2.0, -1.0, NaN, NaN ] );\nout = new Float64Array( 2 );\nbase.strided.dnannsumpw( 4, x, 2, out, 1 )\nvar x0 = new Float64Array( [ 1.0, -2.0, 3.0, 2.0, 5.0, 1.0, NaN, NaN ] );\nvar x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 );\nout = new Float64Array( 2 );\nbase.strided.dnannsumpw( 4, x1, 2, out, 1 )\n"
1853-
base.strided.dnannsumpw.ndarray,"var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\nvar out = new Float64Array( 2 );\nbase.strided.dnannsumpw.ndarray( x.length, x, 1, 0, out, 1, 0 )\nvar x = new Float64Array( [ 1.0, -2.0, 3.0, 2.0, 5.0, 1.0, NaN, NaN ] );\nout = new Float64Array( 2 );\nbase.strided.dnannsumpw.ndarray( 4, x, 2, 1, out, 1, 0 )\n"
1853+
base.strided.dnannsumpw.ndarray,"var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\nvar out = new Float64Array( 2 );\nbase.strided.dnannsumpw.ndarray( x.length, x, 1, 0, out, 1, 0 )\nx = new Float64Array( [ 1.0, -2.0, 3.0, 2.0, 5.0, 1.0, NaN, NaN ] );\nout = new Float64Array( 2 );\nbase.strided.dnannsumpw.ndarray( 4, x, 2, 1, out, 1, 0 )\n"
18541854
base.strided.dnanrange,"var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\nbase.strided.dnanrange( x.length, x, 1 )\nx = new Float64Array( [ -2.0, 1.0, 1.0, -5.0, 2.0, -1.0, NaN ] );\nbase.strided.dnanrange( 3, x, 2 )\nvar x0 = new Float64Array( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0, NaN ] );\nvar x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 );\nbase.strided.dnanrange( 3, x1, 2 )\n"
18551855
base.strided.dnanrange.ndarray,"var x = new Float64Array( [ 1.0, -2.0, 2.0, NaN ] );\nbase.strided.dnanrange.ndarray( x.length, x, 1, 0 )\nvar x = new Float64Array( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0, NaN ] );\nbase.strided.dnanrange.ndarray( 3, x, 2, 1 )\n"
18561856
base.strided.dnanstdev,"var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\nbase.strided.dnanstdev( x.length, 1, x, 1 )\nx = new Float64Array( [ -2.0, 1.0, 1.0, -5.0, 2.0, -1.0 ] );\nbase.strided.dnanstdev( 3, 1, x, 2 )\nvar x0 = new Float64Array( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0 ] );\nvar x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 );\nbase.strided.dnanstdev( 3, 1, x1, 2 )\n"

0 commit comments

Comments
 (0)