ireal-0.1: Real numbers and intervals with not so inefficient exact arithmetic.

Safe HaskellNone
LanguageHaskell98

Data.Number.IReal.Generators

Synopsis

Documentation

data Dig Source

Constructors

M 
Z 
P 

newtype Frac Source

Constructors

Frac [Dig] 

Instances

Arbitrary Frac 

genIReal :: Gen Integer -> Gen Frac -> Gen IReal Source

uniformNum :: (Integer, Integer) -> Gen IReal Source

Generates real numbers uniformly distributed over the given interval.

uniformIval :: (Integer, Integer) -> Gen IReal Source

Generates real intervals of varying width, with midpoints uniformly distributed over given interval.

exprGen :: Floating a => Gen a -> Gen a Source

Generates random expressions built from values generated by argument generator, arithmetic operators and applications of Floating functions.

propIsRealNum :: IReal -> Property Source

Basic test that the argument is a proper real number (is thin and satisfies Cauchy criterion).

propIsRealIval :: IReal -> Property Source

Basic test that argument is a proper interval (the end points are proper numbers, with left end smaller than right end).