From 3c910506507684b9e362a3a0234d572772f32dff Mon Sep 17 00:00:00 2001 From: mratsim Date: Tue, 3 Apr 2018 10:50:26 +0200 Subject: [PATCH] Use the negate operator provided by ttmath --- src/ttmath.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ttmath.nim b/src/ttmath.nim index 0f0ae67..1a5b1e5 100644 --- a/src/ttmath.nim +++ b/src/ttmath.nim @@ -99,8 +99,7 @@ defineUIntConstructor(UInt512, u512) defineUIntConstructor(UInt1024, u1024) defineUIntConstructor(UInt2048, u2048) -template `-`*(a: Int): Int = - initInt[Int](0) - a +proc `-`*(a: Int): Int {.importcpp: "(- #)".} proc pow*(a: Int, b: int): Int = var tmp = a