Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- (***) :: ( RealFrac a, Enum a, Show a) => a -> a -> a
- exp' :: ( RealFrac a, Show a) => a -> a
- ln' :: ( RealFrac a, Enum a, Show a) => a -> a
- findE :: RealFrac a => a -> a -> Integer
- splitLn :: ( RealFrac a, Show a) => a -> ( Integer , a)
- scaleExp :: RealFrac a => a -> ( Integer , a)
- data CompareResult a
- taylorExpCmp :: RealFrac a => a -> a -> a -> CompareResult a
Documentation
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)`
data CompareResult a Source #
Instances
Eq a => Eq ( CompareResult a) Source # | |
Defined in Cardano.Ledger.NonIntegral (==) :: CompareResult a -> CompareResult a -> Bool Source # (/=) :: CompareResult a -> CompareResult a -> Bool Source # |
|
Show a => Show ( CompareResult a) Source # | |
Defined in Cardano.Ledger.NonIntegral |
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.