commit
5adb562c58
|
@ -106,7 +106,7 @@ proc pow*(a: Int, b: int): Int =
|
|||
tmp.inplacePow(initInt[Int](b))
|
||||
result = tmp
|
||||
|
||||
proc pow*(a: UInt, b: int): UInt =
|
||||
proc pow*(a: UInt, b: uint): UInt =
|
||||
var tmp = a
|
||||
tmp.inplacePow(initUInt[UInt](b))
|
||||
result = tmp
|
||||
|
|
|
@ -21,6 +21,7 @@ suite "ttmath":
|
|||
a + b == "28497092031222200795837".u256
|
||||
a + b != "28497092031222200795838".u256
|
||||
a + b < "28497092031222200795838".u256
|
||||
pow(2.u256, 3) == 8.u256
|
||||
|
||||
suite "Testing conversion functions: Hex, Bytes, Endianness":
|
||||
let
|
||||
|
|
Loading…
Reference in New Issue