this is realistically for a programming project, but is more math centric then CS centric. I am attempting to write a function that approximates a power function, but in order to complete I need to approximate log2(x). using the understanding that
$x^y = x^{a+b+c+d+\dots} = x^a*x^b*x^c*x^d\dots || y = a+b+c+d+\dots$
and that
$\displaystyle x^y = 2^{y\log_2(x)}$ computers think in base $2$ easier then base $10$, or $e$
since this would only be used for values $y \in [1,2)$ the solution only needs to be accurate on those bounds. considering that $log_c(a*c^x) = log_c(a) + x$ by factorization (not necessarily prime) I can reduce the input to a value on those bounds.
I need the RHS of $\displaystyle log_2(x) = || x \in [1,2)$
defined in addition, subtraction, multiplication, and division. whole number exponents are also acceptable.
EDIT: did some analysis, and updated question.