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, b1 ~ b2, LorentzFixedBase b1) => LorentzRounding (Fixed (b1 a)) (Fixed (b2 b)) Source # | Round is implemented using "banker's rounding" strategy, rounding half-way values towards nearest even value |
(KnownNat a, KnownNat b, b1 ~ b2, LorentzFixedBase b1) => LorentzRounding (NFixed (b1 a)) (NFixed (b2 b)) Source # | |
Additional Arithmetic operations
Since Michelson doesn't support divide operation, we will use our own to represent divison of Fixed and Rational values