pub fn main(world: World) -> Void raises { var ok: Bool = true if std.math.minU32(8, 3) != 3 { ok = false } if std.math.minU32(4000000000_u32, 3) != 3 { ok = false } if std.math.maxU32(8, 3) != 8 { ok = false } if std.math.maxU32(4000000000_u32, 3) != 4000000000_u32 { ok = false } if std.math.clampU32(10, 2, 7) != 7 { ok = false } if std.math.clampU32(4000000000_u32, 2, 7) != 7 { ok = false } if std.math.clampU32(1, 7, 2) != 2 { ok = false } if std.math.clampU32(5, 7, 2) != 5 { ok = false } if std.math.gcdU32(84, 30) != 6 { ok = false } if std.math.gcdU32(0, 9) != 9 { ok = false } if std.math.lcmU32(21, 6) != 42 { ok = false } if std.math.lcmU32(0, 6) != 0 { ok = false } if std.math.powU32(3, 4) != 81 { ok = false } if std.math.powU32(9, 0) != 1 { ok = false } if std.math.modPowU32(4, 13, 497) != 445 { ok = false } if std.math.modPowU32(65536_u32, 2_u32, 4294967295_u32) != 1_u32 { ok = false } if std.math.modPowU32(9, 0, 1) != 0 { ok = false } if std.math.modPowU32(9, 4, 0) != 0 { ok = false } if !std.math.isPrimeU32(31) { ok = false } if std.math.isPrimeU32(33) { ok = false } if std.math.isPrimeU32(1) { ok = false } if std.math.divisorCountU32(28) != 6 { ok = false } if std.math.divisorCountU32(1) != 1 { ok = false } if std.math.properDivisorSumU32(28) != 28 { ok = false } if std.math.properDivisorSumU32(12) != 16 { ok = false } if ok { check world.out.write("std math breadth ok\n") } }