On Monday, February 25, 2019 at 2:39:02 PM UTC-8, DrGo wrote: > > Thanks Ian, > The std lib float32 is slow for my purpose. In my benchmarking it is > actually slower than the float64. But I don’t even need float16 precision. > I am working on implementing othe alias method for sampling from a fixed > freq dist with possibly thousands of arbitrary values. So the rng doesn’t > need to be precise or high quality because of rounding eg a rn of .67895 > might end up selecting the same arbitrary value as .67091 or even .65!! > https://en.m.wikipedia.org/wiki/Alias_method >
Also, https://github.com/dgryski/go-discreterand -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.