mirror of
https://github.com/status-im/nim-ttmath.git
synced 2025-02-20 16:28:47 +00:00
Add pow UInt256
This commit is contained in:
parent
2edcf7c621
commit
ec59e3c035
@ -55,6 +55,11 @@ proc pow*(a: UInt256, b: uint64): UInt256 =
|
||||
tmp.inplacePow(b.u256)
|
||||
result = tmp
|
||||
|
||||
proc pow*(a: UInt256, b: UInt256): UInt256 =
|
||||
var tmp = a
|
||||
tmp.inplacePow(b)
|
||||
result = tmp
|
||||
|
||||
proc `mod`*(a: UInt256, b: UInt256): UInt256 =
|
||||
var tmp = a
|
||||
tmp.inplaceDiv(b, result)
|
||||
|
Loading…
x
Reference in New Issue
Block a user