Types
DynamicMontgomeryModint[M] = object a: uint32
- Source Edit
StaticMontgomeryModint[M] = object a: uint32
- Source Edit
Procs
proc `*=`[T: MontgomeryModint](a: var T; b: T or SomeInteger)
- Source Edit
proc `+=`[T: MontgomeryModint](a: var T; b: T or SomeInteger)
- Source Edit
proc `-=`[T: MontgomeryModint](a: var T; b: T or SomeInteger)
- Source Edit
proc `-`[T: MontgomeryModint](a: T): T
- Source Edit
proc `/=`[T: MontgomeryModint](a: var T; b: T or SomeInteger)
- Source Edit
func get_param[M: static[uint32]](self: typedesc[DynamicMontgomeryModint[M]]): ptr [ tuple[M, r, n2: uint32]]
- Source Edit
proc init(T: typedesc[MontgomeryModint]; a: T:type or SomeInteger): auto
- Source Edit
proc inv[T: MontgomeryModint](x: T): T
- Source Edit
proc setMod[T: static[uint32]](self: typedesc[DynamicMontgomeryModint[T]]; M: SomeInteger or SomeUnsignedInt)
- Source Edit
proc val[T: MontgomeryModint](a: T): int
- Source Edit
Macros
macro declarDynamicMontgomeryModint(name, id)
- Source Edit
macro declarStaticMontgomeryModint(name, M)
- Source Edit
Templates
template `mod`[T: MontgomeryModint](self: typedesc[T] or T): int32
- Source Edit
template get_M(T: typedesc[MontgomeryModint]): uint32
- Source Edit
template umod[T: MontgomeryModint](self: typedesc[T] or T): uint32
- Source Edit