scalar logarithm only needs scalar variants of functions
use divides instead of divs in lcm
removing unused includes in scalar gcd