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