Skip to content

Commit 4905f64

Browse files
fix: added main section and eps value
1 parent cb31ebd commit 4905f64

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/node_modules/@stdlib/stats/base/dists/gamma/mode/benchmark/c/benchmark.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818

1919
#include "stdlib/stats/base/dists/gamma/mode.h"
20+
#include "stdlib/constants/float64/eps.h"
2021
#include <stdlib.h>
2122
#include <stdio.h>
2223
#include <math.h>
@@ -100,8 +101,8 @@ static double benchmark( void ) {
100101
int i;
101102

102103
for ( i = 0; i < 100; i++ ) {
103-
alpha[ i ] = random_uniform( 0.0, 20.0 );
104-
beta[ i ] = random_uniform( 0.0, 20.0 );
104+
alpha[ i ] = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
105+
beta[ i ] = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
105106
}
106107

107108
t = tic();

lib/node_modules/@stdlib/stats/base/dists/gamma/mode/lib/native.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@
2222

2323
var addon = require( './../src/addon.node' );
2424

25+
26+
// MAIN //
27+
2528
/**
2629
* Returns the mode of a gamma distribution.
2730
*
31+
* @private
2832
* @param {PositiveNumber} alpha - shape parameter
2933
* @param {PositiveNumber} beta - rate parameter
3034
* @returns {NonNegativeNumber} mode

0 commit comments

Comments
 (0)