| ... | ... | @@ -763,8 +763,8 @@ pub const Mutable = struct { |
| 763 | 763 | /// q may alias with a or b. |
| 764 | 764 | /// |
| 765 | 765 | /// Asserts there is enough memory to store q and r. |
| 766 | | /// The upper bound for r limb count is b.limbs.len. |
| 767 | | /// The upper bound for q limb count is given by `a.limbs.len + b.limbs.len`. |
| 766 | /// The upper bound for r limb count is `b.limbs.len`. |
| 767 | /// The upper bound for q limb count is given by `a.limbs`. |
| 768 | 768 | /// |
| 769 | 769 | /// If `allocator` is provided, it will be used for temporary storage to improve |
| 770 | 770 | /// multiplication performance. `error.OutOfMemory` is handled with a fallback algorithm. |
| ... | ... | @@ -893,9 +893,8 @@ pub const Mutable = struct { |
| 893 | 893 | /// q may alias with a or b. |
| 894 | 894 | /// |
| 895 | 895 | /// Asserts there is enough memory to store q and r. |
| 896 | | /// The upper bound for r limb count is a.limbs.len. |
| 897 | | /// The upper bound for q limb count is given by `calcQuotientLimbLen`. This accounts |
| 898 | | /// for temporary space used by the division algorithm. |
| 896 | /// The upper bound for r limb count is `b.limbs.len`. |
| 897 | /// The upper bound for q limb count is given by `a.limbs.len`. |
| 899 | 898 | /// |
| 900 | 899 | /// If `allocator` is provided, it will be used for temporary storage to improve |
| 901 | 900 | /// multiplication performance. `error.OutOfMemory` is handled with a fallback algorithm. |
| ... | ... | @@ -2569,7 +2568,7 @@ pub const Managed = struct { |
| 2569 | 2568 | /// |
| 2570 | 2569 | /// Returns an error if memory could not be allocated. |
| 2571 | 2570 | pub fn divFloor(q: *Managed, r: *Managed, a: Const, b: Const) !void { |
| 2572 | | try q.ensureCapacity(a.limbs.len + b.limbs.len); |
| 2571 | try q.ensureCapacity(a.limbs.len); |
| 2573 | 2572 | try r.ensureCapacity(b.limbs.len); |
| 2574 | 2573 | var mq = q.toMutable(); |
| 2575 | 2574 | var mr = r.toMutable(); |
| ... | ... | @@ -2586,7 +2585,7 @@ pub const Managed = struct { |
| 2586 | 2585 | /// |
| 2587 | 2586 | /// Returns an error if memory could not be allocated. |
| 2588 | 2587 | pub fn divTrunc(q: *Managed, r: *Managed, a: Const, b: Const) !void { |
| 2589 | | try q.ensureCapacity(a.limbs.len + b.limbs.len); |
| 2588 | try q.ensureCapacity(a.limbs.len); |
| 2590 | 2589 | try r.ensureCapacity(b.limbs.len); |
| 2591 | 2590 | var mq = q.toMutable(); |
| 2592 | 2591 | var mr = r.toMutable(); |