-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Fast number-theoretic functions. -- -- Fast number-theoretic code with a high level of safety guaranteed by -- ATS. @package fast-arithmetic @version 0.1.1.2 -- | This module defines a storable instance for GMP's integer type. module Data.GMP -- | The GMP integer type holds information about array size as well as a -- pointer to an array. data GMPInt GMPInt :: Word32 -> Word32 -> Ptr Word64 -> GMPInt [_mp_alloc] :: GMPInt -> Word32 [_mp_size] :: GMPInt -> Word32 [_mp_d] :: GMPInt -> Ptr Word64 -- | Convert a GMPInt to Haskell's Integer type. gmpToInteger :: GMPInt -> IO Integer instance Foreign.Storable.Storable Data.GMP.GMPInt -- | This provides a few facilities for working with common combinatorial -- functions. module Numeric.Combinatorics factorial :: Int -> IO Integer -- | See here. choose :: Int -> Int -> IO Integer module Numeric.Integer -- | O(√n) isPrime :: Int -> Bool module Numeric.NumberTheory -- | Euler totient function. totient :: Int -> Int -- | Number of distinct divisors. tau :: Int -> Int littleOmega :: Int -> Int -- | See here isPerfect :: Int -> Bool -- | Pure Haskell functions for testing and benchmarking. Specialized for -- Ints. module Numeric.Pure hsIsPrime :: (Integral a) => a -> Bool hsFactorial :: (Integral a) => a -> a hsDoubleFactorial :: (Integral a) => a -> a hsChoose :: (Integral a) => a -> a -> a hsTotient :: (Integral a) => a -> a hsTau :: (Integral a) => a -> Int hsTotientSum :: (Integral a) => a -> a hsLittleOmega :: (Integral a) => a -> Int hsIsPerfect :: (Integral a) => a -> Bool