A Method For Calculating Large Exponents Quickly

119 Views Asked by At

I've derived a formula for calculating large exponents quickly: $$a^b = 2 \cosh( - b \log( a ) )$$

My question is: Has anyone seen anything similar? I am curious if either it's novel OR if I have made an error. :)

My original post here: http://forirony.tumblr.com/post/94189380146/a-different-way-to-calculate-large-exponentials

2

There are 2 best solutions below

2
On BEST ANSWER

The formula is incorrect, but approximately correct for large b. The actual value of your expression is $$a^b+a^{-b}$$

You are mimicking the expression $$a^b = \exp(b\log a)$$ which is exact. Note that $\cosh x =(e^x +e^{-x})/2$; that's why your formula is close.

I'm not sure why you would want to use $\cosh$ instead of $\exp$ since it is inaccurate and typically more expensive to compute.

1
On

We note that by the definition:

$$\cosh(x)\equiv \frac{1}{2}(e^{z}+e^{-z})$$

We have that:

$$2\cosh(-b\log(a))=e^{b\log(a)}+e^{-b\log(a)}=a^{b}+a^{-b}$$

So, whilst your formula is very close for $a,b$ such that $a^{-b}\ll a^{b}$, it is not exactly an identity.