Skip to content

Commit 58e3584

Browse files
fix: PR reviewed changes
1 parent 4d2120e commit 58e3584

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

lib/node_modules/@stdlib/stats/base/dists/levy/entropy/benchmark/benchmark.native.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var Float64Array = require( '@stdlib/array/float64' );
26-
var randu = require( '@stdlib/random/base/randu' );
26+
var uniform = require( '@stdlib/random/base/uniform' );
2727
var EPS = require( '@stdlib/constants/float64/eps' );
2828
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2929
var tryRequire = require( '@stdlib/utils/try-require' );
@@ -51,8 +51,8 @@ bench( pkg+'::native', opts, function benchmark( b ) {
5151
mu = new Float64Array( len );
5252
c = new Float64Array( len );
5353
for ( i = 0; i < len; i++ ) {
54-
mu[ i ] = ( randu() * 100.0 ) - 50.0;
55-
c[ i ] = ( randu() * 20.0 ) + EPS;
54+
mu[ i ] = uniform( -50.0, 50.0);
55+
c[ i ] = uniform( EPS, 20.0);
5656
}
5757

5858
b.tic();

lib/node_modules/@stdlib/stats/base/dists/levy/entropy/include/stdlib/stats/base/dists/levy/entropy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extern "C" {
2727
#endif
2828

2929
/**
30-
* Returns the standard deviation for a Lévy distribution with location `mu` and scale `c`.
30+
* Returns the differentaial entropy for a Lévy distribution with location `mu` and scale `c`.
3131
*/
3232
double stdlib_base_dists_levy_entropy( const double mu, const double c );
3333

lib/node_modules/@stdlib/stats/base/dists/levy/entropy/lib/native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var addon = require( './../src/addon.node' );
3131
* @private
3232
* @param {number} mu - location parameter
3333
* @param {PositiveNumber} c - scale parameter
34-
* @returns {PositiveNumber} standard deviation
34+
* @returns {PositiveNumber} differential entropy
3535
*
3636
* @example
3737
* var y = entropy( 0.0, 1.0 );

lib/node_modules/@stdlib/stats/base/dists/levy/entropy/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"options": {
2+
"options": {
33
"task": "build",
44
"wasm": false
55
},

lib/node_modules/@stdlib/stats/base/dists/levy/entropy/src/main.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,15 @@
2323
#include "stdlib/constants/float64/pi.h"
2424
#include "stdlib/math/base/special/pow.h"
2525

26-
2726
/**
28-
* Returns the entropy for a Lévy distribution with location `mu` and scale `c`.
27+
* Returns the differential entropy for a Lévy distribution with location `mu` and scale `c`.
2928
*
3029
* @param mu location parameter
3130
* @param c scale parameter
32-
* @return standard deviation
31+
* @return differential entropy
3332
*
3433
* @example
35-
* double y = stdlib_base_levy_entropy( 0.0, 1.0 );
34+
* double y = stdlib_base_dists_levy_entropy( 0.0, 1.0 );
3635
* // returns ~3.324
3736
*/
3837
double stdlib_base_dists_levy_entropy( const double mu, const double c ) {
@@ -43,5 +42,5 @@ double stdlib_base_dists_levy_entropy( const double mu, const double c ) {
4342
) {
4443
return 0.0/0.0; // NaN
4544
}
46-
return ( 1.0 + ( 3 * STDLIB_CONSTANT_FLOAT64_EULERGAMMA ) + stdlib_base_ln( 16.0 * stdlib_base_pow( c, 2.0 ) * STDLIB_CONSTANT_FLOAT64_PI ) ) / 2.0;
45+
return ( 1.0 + ( 3.0 * STDLIB_CONSTANT_FLOAT64_EULERGAMMA ) + stdlib_base_ln( 16.0 * stdlib_base_pow( c, 2.0 ) * STDLIB_CONSTANT_FLOAT64_PI ) ) / 2.0;
4746
}

0 commit comments

Comments
 (0)