mirror of
https://github.com/ziglang/zig.git
synced 2026-01-28 18:25:26 +00:00
ideal capacity is now determined by e.g. x += x / f rather than x = x * b / a This turns a multiplication into an addition, making it less likely to overflow the integer. This commit also introduces padToIdeal() which does saturating arithmetic so that no overflow is possible when calculating ideal capacity. closes #7830