File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed
lib/node_modules/@stdlib/stats/base/dists/erlang/stdev Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ static double benchmark( void ) {
104
104
105
105
for ( i = 0 ; i < 100 ; i ++ ) {
106
106
lambda [ i ] = random_uniform ( STDLIB_CONSTANT_FLOAT64_EPS , 10.0 );
107
- k [ i ] = stdlib_base_ceil (random_uniform ( 1.0 , 10.0 ));
107
+ k [ i ] = stdlib_base_ceil ( random_uniform ( 1.0 , 10.0 ) );
108
108
}
109
109
110
110
t = tic ();
Original file line number Diff line number Diff line change 19
19
#include "stdlib/stats/base/dists/erlang/stdev.h"
20
20
#include "stdlib/math/base/napi/binary.h"
21
21
22
- // cppcheck-suppress shadowFunction
23
22
STDLIB_MATH_BASE_NAPI_MODULE_ID_D ( stdlib_base_dists_erlang_stdev )
Original file line number Diff line number Diff line change 34
34
*/
35
35
double stdlib_base_dists_erlang_stdev ( const int32_t k , const double lambda ) {
36
36
if (
37
- k <= 0.0 ||
37
+ k <= 0 ||
38
38
stdlib_base_is_nan ( lambda ) ||
39
39
lambda <= 0.0
40
40
) {
41
41
return 0.0 / 0.0 ; // NaN
42
42
}
43
- return stdlib_base_sqrt ( k ) / lambda ;
43
+ return stdlib_base_sqrt ( ( double ) k ) / lambda ;
44
44
}
You can’t perform that action at this time.
0 commit comments