non-integral-test
Safe HaskellSafe-Inferred
LanguageHaskell2010

Tests.Cardano.Ledger.NonIntegral

Synopsis

Documentation

data E34 Source #

Instances

Instances details
HasResolution E34 Source # 
Instance details

Defined in Tests.Cardano.Ledger.NonIntegral

Methods

resolution ∷ p E34 → Integer

type FixedPoint = Fixed E34 Source #

epsD ∷ Double Source #

eps ∷ Rational Source #

map2 ∷ (a → b) → (a, a) → (b, b) Source #

both ∷ (a → Bool) → (a, a) → Bool Source #

type Diff a = (a, a) Source #

absDiff ∷ Num a ⇒ Diff a → a Source #

(~=) ∷ (Ord a, Num a) ⇒ Diff a → a → Bool Source #

newtype Normalized a Source #

Constructors

Norm (a, a) 

Instances

Instances details
(Fractional a, Arbitrary a) ⇒ Arbitrary (Normalized a) Source # 
Instance details

Defined in Tests.Cardano.Ledger.NonIntegral

Show a ⇒ Show (Normalized a) Source # 
Instance details

Defined in Tests.Cardano.Ledger.NonIntegral

Methods

showsPrec ∷ Int → Normalized a → ShowS

showNormalized a → String

showList ∷ [Normalized a] → ShowS

newtype UnitInterval a Source #

Constructors

Unit a 

Instances

Instances details
(Fractional a, Arbitrary a) ⇒ Arbitrary (UnitInterval a) Source # 
Instance details

Defined in Tests.Cardano.Ledger.NonIntegral

Show a ⇒ Show (UnitInterval a) Source # 
Instance details

Defined in Tests.Cardano.Ledger.NonIntegral

Methods

showsPrec ∷ Int → UnitInterval a → ShowS

showUnitInterval a → String

showList ∷ [UnitInterval a] → ShowS

type NonNegInts = (NonNegative Integer, Positive Integer) Source #

normalizeIntsNonNegInts → (Integer, Integer) Source #

Normalizes the integers, return a pair of integers, such that: fst >= 0, snd > 0, fst <= snd.

normalize ∷ Fractional a ⇒ NonNegInts → (a, a) Source #

toUnit ∷ Fractional a ⇒ NonNegInts → a Source #

type Monotonic a = (a → Bool) → (a → a) → a → a → Property Source #

monotonic ∷ (Ord a, Ord b) ⇒ (a → b) → a → a → Bool Source #

log_pow ∷ (RealFrac a, Show a, Enum a) ⇒ a → a → Diff a Source #

log_law ∷ (RealFrac a, Show a, Enum a) ⇒ a → a → Diff a Source #

exp_law ∷ (RealFrac a, Show a) ⇒ a → a → Diff a Source #

exp_log ∷ (RealFrac a, Show a, Enum a) ⇒ a → Diff a Source #

log_exp ∷ (RealFrac a, Show a, Enum a) ⇒ a → Diff a Source #

exp_UnitInterval ∷ (RealFrac a, Show a, Enum a) ⇒ a → a → Bool Source #

findD ∷ (RealFrac a, Show a) ⇒ a → Bool Source #

pow_Diff ∷ (RealFrac a, Enum a, Show a) ⇒ a → (a, a) → Diff a Source #

leader ∷ (RealFrac a, Show a, Enum a) ⇒ a → a → a Source #

taylorExpCmpCheck ∷ RealFrac a ⇒ a → a → a → Bool Source #

praosLeaderCheck ∷ (RealFrac a, Show a, Enum a) ⇒ a → a → a → a → Bool Source #

prop_DPowDiffUnitInterval Double → Normalized Double → Property Source #

Takes very long, but (e *** b) *** c is not an operation that we use.

prop_DlnLawPositive Double → Positive Double → Property Source #

prop_PowDiffUnitInterval Rational → Normalized Rational → Property Source #

prop_ExpLawUnitInterval Rational → UnitInterval Rational → Property Source #

prop_lnLawPositive Rational → Positive Rational → Property Source #

prop_lnPowUnitInterval Rational → UnitInterval Rational → Property Source #

qcWithLabelTestable prop ⇒ String → Int → prop → IO () Source #