Fix #408
This commit is contained in:
parent
3c6b068c39
commit
bf9480219d
@ -59,7 +59,7 @@ public object ZigguratNormalizedGaussianSampler : NormalizedGaussianSampler {
|
|||||||
|
|
||||||
private fun sampleOne(generator: RandomGenerator): Double {
|
private fun sampleOne(generator: RandomGenerator): Double {
|
||||||
val j = generator.nextLong()
|
val j = generator.nextLong()
|
||||||
val i = (j and LAST.toLong()).toIntExact()
|
val i = (j and LAST.toLong()).toInt()
|
||||||
return if (abs(j) < K[i]) j * W[i] else fix(generator, j, i)
|
return if (abs(j) < K[i]) j * W[i] else fix(generator, j, i)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user