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 E34Integer Source #

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

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

type Diff a = (a, a) Source #

absDiffNum 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

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

normalizeIntsNonNegInts → (Integer, Integer) Source #

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

normalizeFractional a ⇒ NonNegInts → (a, 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 #

taylorExpCmpCheckRealFrac a ⇒ a → a → a → Bool Source #

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

prop_DPowDiffUnitInterval DoubleNormalized DoubleProperty Source #

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

qcWithLabelTestable prop ⇒ StringInt → prop → IO () Source #