Why do `pow` functions only exist for floats?

Exactly what the title says. Why don’t they exist for integer types?

@gingerBill has commented on this before: https://old.reddit.com/r/odinlang/comments/1di7b72/how_can_i_get_power_of_two_integers/l92er6k/

How to handle pow for integer overflow/underflow hasn’t been decided yet, if such a thing is to be included in core.

There is the other question of: why do you want it?

This isn’t a joke question but a serious one.

Well if I have an integer variable that I need to reprocess as an integer I need to cast twice and I am not the biggest fan of casting so much:

integer: u8 = 10
another: u8 = 20

result := another cast(u8)math.pow10_f64(cast(f64)integer)

(i know i can cast using u8() and f64() but that’s still casting)

It’s not the biggest deal, just something I wondered about.

That didn’t answer my question. You just told me how you’d do it with the current approach. You didn’t tell me why you want it for integers.

i worded that badly.
I want integer pow functions so I don’t have to cast the output/input of the float functions as I don’t like casting stuff too often

As I said previously in the Reddit comment, what do you want the behaviour to actually be? This isn’t as obvious as you might think.

You could just write your own with the behaviour you expect though. It could be as trivial as this:

pow_u32 :: proc(x, y: u32) -> (z: u32) {
    for _ in 0..<y {
        z *= x
    }
    return
}

But this doesn’t take into account negative powers (which would effectively be zero) since it is unsigned, nor does it take into account overflow behaviour.