Skip to content

Introduction

Fluky

Happening by or depending on chance in Golang.

Go Reference Go Report Card License

Overview

Fluky Library offers a wide range of methods to generate various types of random values. It relies on the standard rand.Rand located in math/rand and includes several random number generators such as pcg, small prng, splitmix64, xoshiro256++, and xoshiro256**. These generators have been evaluated for their quality using the dieharder test suite.

Please check dieharder results in repo.

Install

go get -u github.com/Pencroff/fluky

Usage example

package main

import (
    "fmt"
    "github.com/Pencroff/fluky"
    src "github.com/Pencroff/fluky/source"
    "math/rand"
)

func main() {
    s := src.NewPcgSource(0)
    r := rand.New(s)
    flk := fluky.NewFluky(r)

    fmt.Println(flk.Uint64())
}