Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Type
Plutus BuiltinInteger
Instances
Type class
class PIntegral a where Source #
Nothing
pdiv :: Term s (a :--> (a :--> a)) Source #
pmod :: Term s (a :--> (a :--> a)) Source #
Instances
PIntegral PInteger Source # | |
Defined in Plutarch.Integer pdiv :: forall (s :: S). Term s (PInteger :--> (PInteger :--> PInteger)) Source # pmod :: forall (s :: S). Term s (PInteger :--> (PInteger :--> PInteger)) Source # pquot :: forall (s :: S). Term s (PInteger :--> (PInteger :--> PInteger)) Source # prem :: forall (s :: S). Term s (PInteger :--> (PInteger :--> PInteger)) Source # | |
PIntegral PPositive Source # | |
Defined in Plutarch.Positive pdiv :: forall (s :: S). Term s (PPositive :--> (PPositive :--> PPositive)) Source # pmod :: forall (s :: S). Term s (PPositive :--> (PPositive :--> PPositive)) Source # pquot :: forall (s :: S). Term s (PPositive :--> (PPositive :--> PPositive)) Source # prem :: forall (s :: S). Term s (PPositive :--> (PPositive :--> PPositive)) Source # |
Functions
pexpModInteger :: forall (s :: S). Term s (PInteger :--> (PInteger :--> (PInteger :--> PInteger))) Source #
Performs modulo exponentiation. More precisely, pexpModInteger b e m
performs b
to the power of e
, modulo m
. The result is always
non-negative.
Note
This will error if the modulus is zero. When given a negative exponent, this will try to find a modular multiplicative inverse, and will error if none exists.
@since WIP