func pow(x : f32, n : u32) -> f32: mut r = 1.0 mut f = x // x^k mut k = 1u while k <= n: if (n & k) != 0u: r = r * f f = f * f k = k + k return r