non-integral-0.1.0.0
Safe Haskell Safe-Inferred
Language Haskell2010

Cardano.Ledger.NonIntegral

Synopsis

Documentation

(***) :: ( RealFrac a, Enum a, Show a) => a -> a -> a Source #

Exponentiation

ln' :: ( RealFrac a, Enum a, Show a) => a -> a Source #

Compute natural logarithm via continued fraction, first splitting integral part and then using continued fractions approximation for `ln(1+x)`

findE :: RealFrac a => a -> a -> Integer Source #

find n with `e^n<=x<e^(n+1)`

taylorExpCmp :: RealFrac a => a -> a -> a -> CompareResult a Source #

Efficient way to compare the result of the Taylor expansion of the exponential function to a threshold value. Using error estimation one can stop early, once it's known the result will certainly be above or below the target value.