Skip to content

Commit a9f23f2

Browse files
committed
removing unnecessary steps in nimMul64by64To128()
1 parent ba55734 commit a9f23f2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

nint128.nimble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Package
22

3-
version = "0.3.2"
3+
version = "0.3.3"
44
author = "rockcavera"
55
description = "128-bit integers"
66
license = "MIT"

src/nint128/arithmetic/multiplication.nim

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ func nimMul64by64To128(a, b: uint64): UInt128 {.inline.} =
1818
result.lo = tmp and 0xFFFFFFFF'u64
1919
tmp = tmp shr 32
2020
tmp += aHi * bLo
21-
result.lo = ((tmp and 0xFFFFFFFF'u64) shl 32) or result.lo
2221
result.hi = tmp shr 32
23-
tmp = result.lo shr 32
24-
result.lo = result.lo and 0xFFFFFFFF'u64
22+
tmp = tmp and 0xFFFFFFFF'u64
2523
tmp += bHi * aLo
2624
result.lo = ((tmp and 0xFFFFFFFF'u64) shl 32) or result.lo
2725
result.hi += tmp shr 32

0 commit comments

Comments
 (0)