grfn-1.0.0.0: grfn.cabal
cabal-version: 3.6
name: grfn
version: 1.0.0.0
homepage: https://github.com/threeeyedgod/grfn#readme
license: BSD-3-Clause
license-file: LICENSE
author: Venkatesh Narayanan
maintainer: venkatesh.narayanan@live.in
copyright: 2024 ThreeEyedGod
synopsis: Uniformly-random pre-factored numbers (Kalai)
description:
@__grfn__@ is an focused library. @grfn@ is an implementation of Adam Kalai's algorithm
to get uniform pre-factored numbers.
See [README](https://github.com/threeeyedgod/grfn#grfn) for more details.
/Example:/ a single pre-factored number guaranteed with uniform probability may be obtained by one of these 3 calls.
preFactoredNumOfBitSizePar is a concurrent parallized implementation and may offer performance
>>> genARandomPreFactoredNumberLTEn 20 -- will give a pre-factored number less than or equal to 20.
>>> Right (8,[2,2,2,1])
>>> preFactoredNumOfBitSize 20 -- will give a pre-factored number in the range [2^20, 2^21 - 1]
>>> Right (1695177,[17123,11,3,3,1])
>>> preFactoredNumOfBitSizePar 60 -- will give a pre-factored number in the range [2^60, 2^61 - 1]
>>> Right (1245467344549977447,[332515759,233924281,179,19,3,3,1])
category: Algorithm, Random, Numbers
build-type: Simple
stability: experimental
extra-source-files: README.md
extra-doc-files:
CHANGELOG.md
tested-with: GHC == 9.8.2
GHC == 9.6.5
source-repository head
type: git
location: https://github.com/threeeyedgod/grfn
library
hs-source-dirs: src
exposed-modules: FactoredRandomNumbers
build-depends:
base >= 4.18.2 && <= 4.20.0.1
,protolude ^>= 0.3.4
,text >= 2.0.2 && <= 2.1.1
,random >=1.2.1.2 && < 1.3
,arithmoi >= 0.13.0 && < 0.14
,monad-loops >= 0.4.3 && < 3.3
,parallel-io >= 0.3.5 && < 0.4
,async >=2.2.5 && < 2.3
,parallel >=3.2.2 && < 3.3
,unamb ^>= 0.2.7
default-language: Haskell2010
ghc-options: -Wall
-Wcompat
-Widentities
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wmissing-export-lists
-Wmissing-home-modules
-Wpartial-fields
-Wredundant-constraints
-fwrite-ide-info
-hiedir=.hie
-threaded
-Wunused-packages
executable grfn-exe
hs-source-dirs: app
main-is: Main.hs
build-depends: base
, grfn
, time >= 1.12.2 && < 1.13
default-language: Haskell2010
ghc-options: -Wall
-Wcompat
-Widentities
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wmissing-export-lists
-Wmissing-home-modules
-Wpartial-fields
-Wredundant-constraints
-threaded
-rtsopts
-with-rtsopts=-N4
test-suite grfn-test
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: base
, grfn
, QuickCheck >= 2.14.3
, primes
, text >= 2.0.2 && <= 2.1.1
, hspec >= 2.11.7
, hspec-core >= 2.11.7
default-language: Haskell2010
ghc-options:
-- -Wall
-Wcompat
-Widentities
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wmissing-export-lists
-Wmissing-home-modules
-Wpartial-fields
-Wredundant-constraints
-Wno-x-partial
-threaded
-rtsopts
-with-rtsopts=-N
benchmark grfn-benchmark
type: exitcode-stdio-1.0
hs-source-dirs: bench
main-is: BenchFactoredRandomNumbers.hs
build-depends: base
, tasty-bench
, grfn
, tasty >= 1.5
default-language: Haskell2010
ghc-options:
-fproc-alignment=64
-rtsopts
-threaded
-with-rtsopts=-N4