int_pow2: Exponentiation function for integer arguments

int_pow2R Documentation

Exponentiation function for integer arguments

Description

Solaris' compiler freaked hard on the pow function—couldn't figure out whether it should return an int or a float or something, when I used it to get very small powers of two. So I am going to write a silly, simple function (that only gets used a couple of times in an entire execution, and only with very small arguments, so the fact that it is not super efficient should not be a big problem).

Arguments

x

the integer to raise 2 to.


eriqande/CKMRpop documentation built on Jan. 25, 2024, 2:10 p.m.