Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Arithmetic operations
div :: forall r n m s. ArithOpHs Div n m r => (n ': (m ': s)) :-> (r ': s) Source #
Operation that represents division of two values with a given result
Lorentz casts
class LorentzRounding a b where Source #
Class that enables support of rounding operations for Lorentz non-integer values
Instances
(LorentzRational r, Unwrappabled r ~ (a, Natural), ArithOpHs EDiv a Natural (Maybe (a, Natural)), ArithOpHs Add a Natural a, ArithOpHs Add Natural a a) => LorentzRounding r a Source # | |
(KnownNat a, KnownNat b) => LorentzRounding (Fixed (BinBase a)) (Fixed (BinBase b)) Source # | |
Defined in Lorentz.CustomArith.FixedArith | |
(KnownNat a, KnownNat b) => LorentzRounding (Fixed (DecBase a)) (Fixed (DecBase b)) Source # | Round is implemented using "banker's rounding" strategy, rounding half-way values towards nearest even value |
Defined in Lorentz.CustomArith.FixedArith | |
(KnownNat a, KnownNat b) => LorentzRounding (NFixed (BinBase a)) (NFixed (BinBase b)) Source # | |
Defined in Lorentz.CustomArith.FixedArith | |
LorentzRounding (Fixed (DecBase a)) (Fixed (DecBase b)) => LorentzRounding (NFixed (DecBase a)) (NFixed (DecBase b)) Source # | |
Defined in Lorentz.CustomArith.FixedArith |
Additional Arithmetic operations
Since Michelson doesn't support divide operation, we will use our own to represent divison of Fixed and Rational values