Skip to content

feat: add math/base/special/kernel-log1pf #4761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
5bdb01e
feat: add `stats/base/dists/planck/mode`
Jaysukh-409 Jan 2, 2025
28ad086
feat: add `stats/base/dists/planck/logpmf`
Jaysukh-409 Jan 2, 2025
cc7736d
feat: add `stats/base/dists/planck/entropy`
Jaysukh-409 Jan 2, 2025
0e7298c
feat: add `stats/base/dists/planck/quantile`
Jaysukh-409 Jan 2, 2025
768f5dc
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 2, 2025
e00710b
style: align comments
kgryte Jan 2, 2025
0959d55
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 2, 2025
76bc4d8
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 2, 2025
3d3e5e0
fix: guard against proxy traps raising exceptions in REPL tokenizer
Snehil-Shah Jan 2, 2025
2587ed9
style: add missing parentheses
kgryte Jan 2, 2025
1256364
refactor: update `stats/base/smeanli` native addon from C++ to C
vivekmaurya001 Jan 2, 2025
ae1ea18
refactor: update `stats/base/smeankbn2` native addon from C++ to C
vivekmaurya001 Jan 2, 2025
082627d
refactor: update `stats/base/smeankbn` native addon from C++ to C
vivekmaurya001 Jan 2, 2025
82c864a
refactor: update `stats/base/smean` native addon from C++ to C
vivekmaurya001 Jan 2, 2025
5156694
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 2, 2025
adfad15
refactor: update `stats/base/sdsnanmeanors` native addon from C++ to C
vivekmaurya001 Jan 2, 2025
858583d
refactor: update `stats/base/sdsnanmean` native addon from C++ to C
vivekmaurya001 Jan 2, 2025
4285983
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 2, 2025
0ac69f7
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 2, 2025
ec70be1
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 2, 2025
e3ed80c
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 2, 2025
f6ea607
refactor: update `stats/base/snanvariance` native addon from C++ to C
DhruvArvindSingh Jan 2, 2025
2d6423c
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 2, 2025
bd7bc8f
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 2, 2025
d0d3ae7
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 2, 2025
4fbccdd
refactor: update `stats/base/sstdevtk` native addon from C++ to C
DhruvArvindSingh Jan 2, 2025
104495a
refactor: update `stats/base/snanstdevtk` native addon from C++ to C
DhruvArvindSingh Jan 2, 2025
c761318
refactor: update `stats/base/snanstdevpn` native addon from C++ to C
DhruvArvindSingh Jan 2, 2025
0ec7b9b
refactor: update `stats/base/snanstdevyc` native addon from C++ to C
DhruvArvindSingh Jan 2, 2025
156bc2f
refactor: update `stats/base/snanvariancech` native addon from C++ to C
DhruvArvindSingh Jan 2, 2025
f1070e3
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 3, 2025
47d9337
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 3, 2025
7d53e6d
build: do not set custom GitHub token
Planeshifter Jan 3, 2025
b0858ad
docs: add missing spaces
Planeshifter Jan 3, 2025
176eef8
chore: disable lint rule
Planeshifter Jan 3, 2025
783088c
refactor: explicitly return zero for non-integer x
Planeshifter Jan 3, 2025
60d3780
feat: add C implementation for `stats/base/dists/cosine/skewness`
0PrashantYadav0 Jan 3, 2025
d7eca9f
feat: add C implementation for `stats/base/dists/cosine/median`
0PrashantYadav0 Jan 3, 2025
e1a040e
feat: add C implementation for `stats/base/dists/cosine/stdev`
0PrashantYadav0 Jan 3, 2025
87788fe
feat: add C implementation for `stats/base/dists/cosine/mode`
0PrashantYadav0 Jan 3, 2025
301c7db
feat: add C implementation for `stats/base/dists/triangular/pdf`
0PrashantYadav0 Jan 3, 2025
0699aa7
feat: add C implementation for `stats/base/dists/geometric/entropy`
0PrashantYadav0 Jan 3, 2025
b15d6c5
fix: update include paths and reorder includes
kgryte Jan 3, 2025
a41b104
fix: update include paths and reorder includes
kgryte Jan 3, 2025
412728d
docs: fix include paths in examples
kgryte Jan 3, 2025
5eac7da
docs: fix include paths in examples
kgryte Jan 3, 2025
c5f2777
fix: update include paths and reorder includes
kgryte Jan 3, 2025
f5da925
style: update include order
kgryte Jan 3, 2025
4befa33
fix: update include paths and refactor branching logic
kgryte Jan 3, 2025
a175708
fix: update include paths and refactor branching logic
kgryte Jan 3, 2025
4f70654
docs: update note
kgryte Jan 3, 2025
5ae1ada
docs: update note
kgryte Jan 3, 2025
1df3d7c
fix: update include paths and reorder includes
kgryte Jan 3, 2025
43782d3
feat: add C implementation for `stats/base/dists/logistic/kurtosis`
0PrashantYadav0 Jan 3, 2025
ab5adfb
docs: update related packages sections
stdlib-bot Jan 3, 2025
7b11c90
docs: update REPL namespace documentation
stdlib-bot Jan 3, 2025
960b084
feat: update namespace TypeScript declarations
stdlib-bot Jan 3, 2025
810f68a
feat: add C implementation for `stats/base/dists/rayleigh/median`
0PrashantYadav0 Jan 3, 2025
1c1a282
docs: update namespace table of contents
stdlib-bot Jan 3, 2025
16d5a84
docs: update list of contributors
stdlib-bot Jan 3, 2025
03e10ed
refactor: move variable declaration
kgryte Jan 3, 2025
fc7a7b8
chore: update copyright years
kgryte Jan 3, 2025
3a15881
chore: update copyright year
kgryte Jan 3, 2025
fb26ebe
chore: update copyright year
kgryte Jan 3, 2025
82d1f24
chore: update mailmap
kgryte Jan 3, 2025
cf5c6b2
chore: update mailmap
kgryte Jan 3, 2025
d9f4811
feat: add C `ndarray` interface and refactor implementation for `stat…
Neerajpathak07 Jan 3, 2025
1a97dfa
refactor: update `math/base/assert/is-even` to follow latest project …
vivekmaurya001 Jan 3, 2025
d2fc457
refactor: update `stats/base/snanstdevch` native addon from C++ to C
DhruvArvindSingh Jan 3, 2025
64a5d93
refactor: update `stats/base/snanstdevwd` native addon from C++ to C
DhruvArvindSingh Jan 3, 2025
e04b98e
refactor: update `stats/base/snanvariancewd` native addon from C++ to C
DhruvArvindSingh Jan 3, 2025
d9ddb96
refactor: update `stats/base/snanvariancetk` native addon from C++ to C
DhruvArvindSingh Jan 3, 2025
aa4b857
refactor: update `stats/base/sstdev` native addon from C++ to C
DhruvArvindSingh Jan 3, 2025
d11fe8d
refactor: update `stats/base/sstdevpn` native addon from C++ to C
DhruvArvindSingh Jan 3, 2025
6c99f7d
refactor: update `stats/base/snanvarianceyc` native addon from C++ to C
DhruvArvindSingh Jan 3, 2025
32e6c57
refactor: update `stats/base/sstdevch` native addon from C++ to C
DhruvArvindSingh Jan 3, 2025
0fbd459
docs: fix examples
kgryte Jan 3, 2025
58275a4
test: fix arguments
kgryte Jan 3, 2025
78cb140
chore: remove unused header in `stats/base/dnanmeanwd`
aayush0325 Jan 3, 2025
59ab5be
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 3, 2025
bcae23b
feat: add C ndarray interface and refactor implementation for `stats/…
aayush0325 Jan 3, 2025
15b212e
docs: update related packages sections
stdlib-bot Jan 4, 2025
3f8d07a
docs: update namespace table of contents
stdlib-bot Jan 4, 2025
69da34e
docs: update list of contributors
stdlib-bot Jan 4, 2025
0b2e74a
feat: update namespace TypeScript declarations
stdlib-bot Jan 4, 2025
83b6c34
docs: update REPL namespace documentation
stdlib-bot Jan 4, 2025
dd35147
docs: fix comments
kgryte Jan 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/workflows/labeler_needs_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
# Pin action to a known commit SHA for reproducibility:
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
script: |
await github.rest.issues.addLabels({
'owner': context.repo.owner,
Expand Down
6 changes: 6 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ Chinmay Joshi <[email protected]> Chinmay J
Debashis Maharana <[email protected]> <[email protected]>
Debashis Maharana <[email protected]> DebashisMaharana

Dhruv Arvind Singh <[email protected]> DhruvArvindSingh
Dhruv Arvind Singh <[email protected]> Dhruv/

Dorrin Sotoudeh <[email protected]> <[email protected]>
Dorrin Sotoudeh <[email protected]> dorrin-sot

Expand Down Expand Up @@ -216,6 +219,9 @@ Vaibhav Patel <[email protected]> ProCoderVP
Varad Gupta <[email protected]> <[email protected]>
Varad Gupta <[email protected]> vr-varad

Vivek Maurya <[email protected]> <[email protected]>
Vivek Maurya <[email protected]> vivekmaurya001

# Y

Yaswanth Kosuru <[email protected]> yaswanth
Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Daniel Killenberger <[email protected]>
Daniel Yu <[email protected]>
Debashis Maharana <[email protected]>
Desh Deepak Kant <[email protected]>
Dhruv Arvind Singh <[email protected]>
Divyansh Seth <[email protected]>
Dominic Lim <[email protected]>
Dominik Moritz <[email protected]>
Expand Down Expand Up @@ -117,7 +118,7 @@ UtkershBasnet <[email protected]>
Vaibhav Patel <[email protected]>
Varad Gupta <[email protected]>
Vinit Pandit <[email protected]>
Vivek maurya <[email protected].com>
Vivek Maurya <vm8118134@gmail.com>
Xiaochuan Ye <[email protected]>
Yaswanth Kosuru <[email protected]>
Yernar Yergaziyev <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Copyright (c) 2016-2024 The Stdlib Authors.
Copyright (c) 2016-2025 The Stdlib Authors.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ See [LICENSE][stdlib-license].

## Copyright

Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors].

</section>

Expand Down
27 changes: 27 additions & 0 deletions lib/node_modules/@stdlib/array/base/ones/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ console.log( arr );

<section class="related">

* * *

## See Also

- <span class="package-name">[`@stdlib/array/base/zeros`][@stdlib/array/base/zeros]</span><span class="delimiter">: </span><span class="description">create a zero-filled generic array.</span>
- <span class="package-name">[`@stdlib/array/base/ones2d`][@stdlib/array/base/ones2d]</span><span class="delimiter">: </span><span class="description">create a two-dimensional nested array filled with ones.</span>
- <span class="package-name">[`@stdlib/array/base/ones3d`][@stdlib/array/base/ones3d]</span><span class="delimiter">: </span><span class="description">create a three-dimensional nested array filled with ones.</span>
- <span class="package-name">[`@stdlib/array/base/ones4d`][@stdlib/array/base/ones4d]</span><span class="delimiter">: </span><span class="description">create a four-dimensional nested array filled with ones.</span>
- <span class="package-name">[`@stdlib/array/base/ones5d`][@stdlib/array/base/ones5d]</span><span class="delimiter">: </span><span class="description">create a five-dimensional nested array filled with ones.</span>
- <span class="package-name">[`@stdlib/array/base/onesnd`][@stdlib/array/base/onesnd]</span><span class="delimiter">: </span><span class="description">create an n-dimensional nested array filled with ones.</span>

</section>

<!-- /.related -->
Expand All @@ -111,6 +122,22 @@ console.log( arr );

<section class="links">

<!-- <related-links> -->

[@stdlib/array/base/zeros]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/zeros

[@stdlib/array/base/ones2d]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/ones2d

[@stdlib/array/base/ones3d]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/ones3d

[@stdlib/array/base/ones4d]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/ones4d

[@stdlib/array/base/ones5d]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/ones5d

[@stdlib/array/base/onesnd]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/onesnd

<!-- </related-links> -->

</section>

<!-- /.links -->
27 changes: 27 additions & 0 deletions lib/node_modules/@stdlib/array/base/zeros3d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@ out = zeros3d( [ 1, 3, 1 ] );

<section class="related">

* * *

## See Also

- <span class="package-name">[`@stdlib/array/base/zeros`][@stdlib/array/base/zeros]</span><span class="delimiter">: </span><span class="description">create a zero-filled generic array.</span>
- <span class="package-name">[`@stdlib/array/base/ones3d`][@stdlib/array/base/ones3d]</span><span class="delimiter">: </span><span class="description">create a three-dimensional nested array filled with ones.</span>
- <span class="package-name">[`@stdlib/array/base/zeros2d`][@stdlib/array/base/zeros2d]</span><span class="delimiter">: </span><span class="description">create a zero-filled two-dimensional nested array.</span>
- <span class="package-name">[`@stdlib/array/base/zeros4d`][@stdlib/array/base/zeros4d]</span><span class="delimiter">: </span><span class="description">create a zero-filled four-dimensional nested array.</span>
- <span class="package-name">[`@stdlib/array/base/zeros5d`][@stdlib/array/base/zeros5d]</span><span class="delimiter">: </span><span class="description">create a zero-filled five-dimensional nested array.</span>
- <span class="package-name">[`@stdlib/array/base/zerosnd`][@stdlib/array/base/zerosnd]</span><span class="delimiter">: </span><span class="description">create a zero-filled n-dimensional nested array.</span>

</section>

<!-- /.related -->
Expand All @@ -103,6 +114,22 @@ out = zeros3d( [ 1, 3, 1 ] );

<section class="links">

<!-- <related-links> -->

[@stdlib/array/base/zeros]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/zeros

[@stdlib/array/base/ones3d]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/ones3d

[@stdlib/array/base/zeros2d]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/zeros2d

[@stdlib/array/base/zeros4d]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/zeros4d

[@stdlib/array/base/zeros5d]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/zeros5d

[@stdlib/array/base/zerosnd]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/zerosnd

<!-- </related-links> -->

</section>

<!-- /.links -->
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/array/to-fancy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ var x = [ 1, 2, 3, 4, 5, 6, 7, 8 ];
// Turn the plain array into a "fancy" array:
var y = array2fancy( x );

// Select the first 3 elements:
// Select the first three elements:
var v = y[ ':3' ];
// returns [ 1, 2, 3 ]

// Select every other element, starting from the second element:
v = y[ '1::2' ];
// returns [ 2, 4, 6, 8 ]

// Select every other element, in reverse order, starting with the least element:
// Select every other element, in reverse order, starting with the last element:
v = y[ '::-2' ];
// returns [ 8, 6, 4, 2 ]

Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ var ns = extblas;
- <span class="signature">[`dssumpw( N, x, strideX )`][@stdlib/blas/ext/base/dssumpw]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using pairwise summation with extended accumulation and returning an extended precision result.</span>
- <span class="signature">[`dsum( N, x, strideX )`][@stdlib/blas/ext/base/dsum]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision floating-point strided array elements.</span>
- <span class="signature">[`dsumkbn( N, x, strideX )`][@stdlib/blas/ext/base/dsumkbn]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision floating-point strided array elements using an improved Kahan–Babuška algorithm.</span>
- <span class="signature">[`dsumkbn2( N, x, stride )`][@stdlib/blas/ext/base/dsumkbn2]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision floating-point strided array elements using a second-order iterative Kahan–Babuška algorithm.</span>
- <span class="signature">[`dsumkbn2( N, x, strideX )`][@stdlib/blas/ext/base/dsumkbn2]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision floating-point strided array elements using a second-order iterative Kahan–Babuška algorithm.</span>
- <span class="signature">[`dsumors( N, x, stride )`][@stdlib/blas/ext/base/dsumors]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision floating-point strided array elements using ordinary recursive summation.</span>
- <span class="signature">[`dsumpw( N, x, stride )`][@stdlib/blas/ext/base/dsumpw]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision floating-point strided array elements using pairwise summation.</span>
- <span class="signature">[`gapx( N, alpha, x, stride )`][@stdlib/blas/ext/base/gapx]</span><span class="delimiter">: </span><span class="description">add a constant to each element in a strided array.</span>
- <span class="signature">[`gapxsum( N, alpha, x, stride )`][@stdlib/blas/ext/base/gapxsum]</span><span class="delimiter">: </span><span class="description">add a constant to each strided array element and compute the sum.</span>
- <span class="signature">[`gapxsumkbn( N, alpha, x, stride )`][@stdlib/blas/ext/base/gapxsumkbn]</span><span class="delimiter">: </span><span class="description">add a constant to each strided array element and compute the sum using an improved Kahan–Babuška algorithm.</span>
- <span class="signature">[`gapxsumkbn( N, alpha, x, strideX )`][@stdlib/blas/ext/base/gapxsumkbn]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each strided array element and compute the sum using an improved Kahan–Babuška algorithm.</span>
- <span class="signature">[`gapxsumkbn2( N, alpha, x, stride )`][@stdlib/blas/ext/base/gapxsumkbn2]</span><span class="delimiter">: </span><span class="description">add a constant to each strided array element and compute the sum using a second-order iterative Kahan–Babuška algorithm.</span>
- <span class="signature">[`gapxsumors( N, alpha, x, stride )`][@stdlib/blas/ext/base/gapxsumors]</span><span class="delimiter">: </span><span class="description">add a constant to each strided array element and compute the sum using ordinary recursive summation.</span>
- <span class="signature">[`gapxsumpw( N, alpha, x, stride )`][@stdlib/blas/ext/base/gapxsumpw]</span><span class="delimiter">: </span><span class="description">add a constant to each strided array element and compute the sum using pairwise summation.</span>
Expand Down
12 changes: 6 additions & 6 deletions lib/node_modules/@stdlib/blas/ext/base/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1370,7 +1370,7 @@ interface Namespace {
*
* @param N - number of indexed elements
* @param x - input array
* @param stride - stride length
* @param strideX - stride length
* @returns sum
*
* @example
Expand Down Expand Up @@ -1490,12 +1490,12 @@ interface Namespace {
gapxsum: typeof gapxsum;

/**
* Adds a constant to each strided array element and computes the sum using an improved Kahan–Babuška algorithm.
* Adds a scalar constant to each strided array element and computes the sum using an improved Kahan–Babuška algorithm.
*
* @param N - number of indexed elements
* @param alpha - constant
* @param alpha - scalar constant
* @param x - input array
* @param stride - stride length
* @param strideX - stride length
* @returns sum
*
* @example
Expand Down Expand Up @@ -1636,9 +1636,9 @@ interface Namespace {
* @param N - number of indexed elements
* @param sum - initial sum
* @param x - input array
* @param strideX - `x` stride length
* @param strideX - stride length for `x`
* @param y - output array
* @param strideY - `y` stride length
* @param strideY - stride length for `y`
* @returns output array
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ Macro for the maximum [safe][safe-integers] nth [Fibonacci number][fibonacci-num

<section class="related">

* * *

## See Also

- <span class="package-name">[`@stdlib/constants/float64/max-safe-nth-fibonacci`][@stdlib/constants/float64/max-safe-nth-fibonacci]</span><span class="delimiter">: </span><span class="description">maximum safe nth Fibonacci number when stored in double-precision floating-point format.</span>

</section>

<!-- /.related -->
Expand All @@ -164,6 +170,8 @@ Macro for the maximum [safe][safe-integers] nth [Fibonacci number][fibonacci-num

<!-- <related-links> -->

[@stdlib/constants/float64/max-safe-nth-fibonacci]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float64/max-safe-nth-fibonacci

<!-- </related-links> -->

</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Macro for the square root of the mathematical constant [π][@stdlib/constants/fl

## See Also

- <span class="package-name">[`@stdlib/constants/float32/pi`][@stdlib/constants/float32/pi]</span><span class="delimiter">: </span><span class="description">π.</span>
- <span class="package-name">[`@stdlib/constants/float64/sqrt-half-pi`][@stdlib/constants/float64/sqrt-half-pi]</span><span class="delimiter">: </span><span class="description">square root of 0.5π.</span>

</section>

Expand All @@ -134,9 +134,11 @@ Macro for the square root of the mathematical constant [π][@stdlib/constants/fl

<section class="links">

[@stdlib/constants/float32/pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float32/pi

<!-- <related-links> -->

[@stdlib/constants/float32/pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float32/pi
[@stdlib/constants/float64/sqrt-half-pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float64/sqrt-half-pi

<!-- </related-links> -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
// MODULES //

var bench = require( '@stdlib/bench' );
var randu = require( '@stdlib/random/base/randu' );
var round = require( '@stdlib/math/base/special/round' );
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
var pkg = require( './../package.json' ).name;
var isEven = require( './../lib' );
Expand All @@ -31,14 +30,17 @@ var isEven = require( './../lib' );
// MAIN //

bench( pkg, function benchmark( b ) {
var len;
var x;
var y;
var i;

len = 100;
x = discreteUniform( len, 0, 1000 );

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = round( (randu()*1.0e7) - 5.0e6 );
y = isEven( x );
y = isEven( x[ i % len ] );
if ( typeof y !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@

var resolve = require( 'path' ).resolve;
var bench = require( '@stdlib/bench' );
var randu = require( '@stdlib/random/base/randu' );
var round = require( '@stdlib/math/base/special/round' );
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
var tryRequire = require( '@stdlib/utils/try-require' );
var pkg = require( './../package.json' ).name;
Expand All @@ -40,14 +39,17 @@ var opts = {
// MAIN //

bench( pkg+'::native', opts, function benchmark( b ) {
var len;
var x;
var y;
var i;

len = 100;
x = discreteUniform( len, 0, 1000 );

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
x = round( (randu()*1.0e7) - 5.0e6 );
y = isEven( x );
y = isEven( x[ i % len ] );
if ( typeof y !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,18 @@ static double rand_double( void ) {
*/
static double benchmark( void ) {
double elapsed;
double x;
double x[ 100 ];
double t;
bool b;
int i;

for ( i = 0; i < 100; i++ ) {
x[ i ] = round( (rand_double()*200.0) - 100.0 );
}

t = tic();
for ( i = 0; i < ITERATIONS; i++ ) {
x = ( rand_double() * 200.0 ) - 100.0;
b = stdlib_base_is_even( x );
b = stdlib_base_is_even( x[ i%100 ] );
if ( b != true && b != false ) {
printf( "should return either true or false\n" );
break;
Expand Down
41 changes: 40 additions & 1 deletion lib/node_modules/@stdlib/math/base/assert/is-even/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"options": {},
"options": {
"task": "build"
},
"fields": [
{
"field": "src",
Expand All @@ -24,6 +26,43 @@
],
"confs": [
{
"task": "build",
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [
"-lm"
],
"libpath": [],
"dependencies": [
"@stdlib/math/base/assert/is-integer",
"@stdlib/napi/export",
"@stdlib/napi/argv",
"@stdlib/napi/argv-double",
"@stdlib/napi/create-int32"
]
},
{
"task": "benchmark",
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [
"-lm"
],
"libpath": [],
"dependencies": [
"@stdlib/math/base/assert/is-integer"
]
},
{
"task": "examples",
"src": [
"./src/main.c"
],
Expand Down
Loading