Counting number of multiplications and additions in exponential function exp(.)

307 Views Asked by At

Existing works have evaluated the computational complexity of $\exp$ function using the big-$O$ operation. For example, the paper "On the complexity of familiar functions and numbers" by Borwein specified the complexity as $O(\log^3 n)$.

Is it possible to explicitly count the number of multiplications and additions that are used to compute $\exp(\cdot)$, rather than the big-$O$ approximation? Thank you.

1

There are 1 best solutions below

1
On BEST ANSWER

Yes of course: if you are using a particular algorithm to compute $\exp(x)$ for a given $x$ to within a given tolerance $\epsilon$, you can go through it step by step and explicitly count each multiplication and addition you perform. If you want a closed-form formula in terms of $x$ and $\epsilon$, that might be more difficult, depending on the algorithm.