File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ pub fn (u Uint128) mul_64(v u64) Uint128 {
213213 return Uint128 {lo, hi}
214214}
215215
216- // overflowing_mul_64 returns u x v even if result size > 64
216+ // overflowing_mul_64 returns u x v even if result size > 128
217217pub fn (u Uint128) overflowing_mul_64 (v u64 ) (Uint128 , bool ) {
218218 hi , lo := bits.mul_64 (u.lo, v)
219219 p0 , p1 := bits.mul_64 (u.hi, v)
@@ -222,7 +222,7 @@ pub fn (u Uint128) overflowing_mul_64(v u64) (Uint128, bool) {
222222 return Uint128 {lo, hi2 }, p0 != 0 || c0 != 0
223223}
224224
225- // overflowing_add_64 returns u = v even if result size > 64
225+ // overflowing_add_64 returns u + v even if result size > 128
226226pub fn (u Uint128) overflowing_add_64 (v u64 ) (Uint128 , u64 ) {
227227 lo , carry := bits.add_64 (u.lo, v, 0 )
228228 hi , carry2 := bits.add_64 (u.hi, 0 , carry)
You can’t perform that action at this time.
0 commit comments