Skip to content

Commit 47145ea

Browse files
authored
math.unsigned: fix typos for uint128 (#24863)
1 parent 00e0eae commit 47145ea

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎vlib/math/unsigned/uint128.v‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
217217
pub 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
226226
pub 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)

0 commit comments

Comments
 (0)