Skip to content

Commit f9e7dff

Browse files
committed
fix(owl/stats): use correct paramterised gaussian
The function `std_gaussian_rvs` does not accept any parameters like mu or sigma. Thus, `exponpow_rvs()` shall call the paramterised function `gaussian_rvs(mu, sigma)` to generate gaussian random variables.
1 parent d079b1b commit f9e7dff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/owl/stats/owl_stats_dist_exponpow.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ double exponpow_rvs (const double a, const double b) {
3333
return a * x;
3434
}
3535
else if (b == 2) {
36-
return std_gaussian_rvs (a / sqrt (2.0));
36+
return gaussian_rvs (0.0, a / sqrt (2.0));
3737
}
3838
else {
3939
double x, h, u;
4040
double B = pow (1 / b, 1 / b);
4141

4242
do {
43-
x = std_gaussian_rvs (B);
43+
x = gaussian_rvs (0.0, B);
4444
u = sfmt_f64_3;
4545
h = -pow (fabs (x), b) + (x * x) / (2 * B * B) + (1 / b) - 0.5;
4646
}

0 commit comments

Comments
 (0)