Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Dec 16, 2024
1 parent 25cb1c2 commit 23003e6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ This release closes the following issue:

<details>

- [`ccbaa42`](https://github.com/stdlib-js/stdlib/commit/ccbaa42486fd36b15e2c17b0d30e0b0508f533d6) - **style:** fix formatting _(by Athan Reines)_
- [`930ed98`](https://github.com/stdlib-js/stdlib/commit/930ed98207b9ae67f00b23917755589dbbd03fe5) - **feat:** add C implementation for `stats/base/dists/uniform/variance` [(#3951)](https://github.com/stdlib-js/stdlib/pull/3951) _(by Aayush Khanna)_

</details>
Expand All @@ -46,9 +47,10 @@ This release closes the following issue:

### Contributors

A total of 1 person contributed to this release. Thank you to this contributor:
A total of 2 people contributed to this release. Thank you to the following contributors:

- Aayush Khanna
- Athan Reines

</section>

Expand Down
4 changes: 2 additions & 2 deletions dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ var pow = require( '@stdlib/math-base-special-pow' );
* // returns NaN
*/
function variance( a, b ) {
if (
a >= b
) {
if ( a >= b ) {
return NaN;
}
return (1.0/12.0) * pow( b-a, 2.0 );
Expand Down
4 changes: 1 addition & 3 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
* // returns ~0.083
*/
double stdlib_base_dists_uniform_variance( const double a, const double b ) {
if (
a >= b
) {
if ( a >= b ) {
return 0.0 / 0.0; // NaN
}
return ( 1.0 / 12.0 ) * stdlib_base_pow( b - a, 2.0 );
Expand Down

0 comments on commit 23003e6

Please sign in to comment.