You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala> spire.random.Gaussian(0.0, 1.0).toLazyList(rng).take(500).toList
java.lang.ArrayIndexOutOfBoundsException:Index-1 out of bounds for length 128
at spire.random.Ziggurat$.loop$1(Ziggurat.scala:83)
at spire.random.Ziggurat$.nfix(Ziggurat.scala:92)
at spire.random.Ziggurat$.rnor(Ziggurat.scala:52)
at spire.random.GaussianInstances.spire$random$GaussianInstances$$anon$2$$_$apply$$anonfun$2(Gaussian.scala:50)
at spire.random.DistFromGen.apply(Dist.scala:177)
at spire.random.Dist.toLazyList$$anonfun$1(Dist.scala:127)
at scala.collection.immutable.LazyList$.$anonfun$continually$1(LazyList.scala:1220)
at scala.collection.immutable.LazyList.scala$collection$immutable$LazyList$$state$lzycompute(LazyList.scala:259)
at scala.collection.immutable.LazyList.scala$collection$immutable$LazyList$$state(LazyList.scala:252)
at scala.collection.immutable.LazyList.isEmpty(LazyList.scala:269)
at scala.collection.immutable.LazyList.$anonfun$takeImpl$1(LazyList.scala:693)
at scala.collection.immutable.LazyList.scala$collection$immutable$LazyList$$state$lzycompute(LazyList.scala:259)
at scala.collection.immutable.LazyList.scala$collection$immutable$LazyList$$state(LazyList.scala:252)
at scala.collection.immutable.LazyList.isEmpty(LazyList.scala:269)
at scala.collection.immutable.LazyList$LazyIterator.hasNext(LazyList.scala:1250)
at scala.collection.immutable.List.prependedAll(List.scala:155)
at scala.collection.IterableOnceOps.toList(IterableOnce.scala:1288)
at scala.collection.IterableOnceOps.toList$(IterableOnce.scala:1288)
at scala.collection.AbstractIterable.toList(Iterable.scala:933)
... 42 elided
It seems to happen faster and more often if I increase the number 500.
The text was updated successfully, but these errors were encountered:
The following invocation in console, spire 0.18, scala 3.3.1:
Call it a few times, and eventually I am getting:
It seems to happen faster and more often if I increase the number 500.
The text was updated successfully, but these errors were encountered: