Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
AtCoder.Extra.ModInt64
Description
ModInt
for 64 bit modulus values.
Since: 1.2.6.0
Synopsis
- newtype ModInt64 a = ModInt64 {
- unModInt64 :: Word64
- new :: forall a. KnownNat a => Int -> ModInt64 a
- new64 :: forall a. KnownNat a => Word64 -> ModInt64 a
- unsafeNew :: KnownNat a => Word64 -> ModInt64 a
- modulus :: forall a. KnownNat a => ModInt64 a -> Int
- val :: forall a. KnownNat a => ModInt64 a -> Int
- val64 :: forall a. KnownNat a => ModInt64 a -> Word64
- pow :: forall a. (HasCallStack, KnownNat a) => ModInt64 a -> Int -> ModInt64 a
- inv :: forall a. (HasCallStack, KnownNat a) => ModInt64 a -> ModInt64 a
ModInt64
Word64
value that treats the modular arithmetic.
Since: 1.2.6.0
Constructors
ModInt64 | |
Fields
|
Instances
Constructors
Safe constructors
Unsafe constructor
unsafeNew :: KnownNat a => Word64 -> ModInt64 a Source #
\(O(1)\) Creates ModInt64
from a Montgomery form with no validation.
Since: 1.2.6.0