[stdlib] Fix int formatting to not go out of bounds, add MIN and MAX for 128 and 256 sized integers by sstadick · Pull Request #4852 · modular/modular · GitHub fixes both this issue, and the original issue UInt256 returns wrong value - #6 by sora.
The tests show the fix for format_int working. I also checked that:
fn main():
var number = Dict[String, Int128]()
for idx in range(2):
number[String(idx)] = Int128(idx)
failed before the fix and works after.