How to compute [$]e^5[$] with two decimal places?

Last edited by Peniel on May 12th, 2013, 10:00 pm, edited 1 time in total.

Though it is quite unclear what you mean and willing/allowing to invest for 'computation' andwhich base you are using:exp(5) = 2^8 * exp(m), m = -55/100 = -0.55 as approximation for 5-8*ln(2) ~ -0.545177444479562where exp(m) can safely be done through the exp series (now alternating, thus cut it).Where of course the two digits 0 and 1 are always enogh

Sorry for being unclear. Forget the two digits, I meant two decimal places.This was actually from a quant test (with an American bank), so pen and paper. Expected time to do it: 5-7mins.The base is exp(1).I thought about using Taylor series directly (something like exp(5) = exp(1)^5 = (1+1/2+1/6+...)^5) but it's very unclear to me and I guess there must be some clever tricks.

Last edited by Peniel on September 18th, 2010, 10:00 pm, edited 1 time in total.

Strange test ... base is exp(1) ? 0*1 + 0*exp(1)^2 + 0*exp(1)^3 + 0*exp(1)^4 + 1*exp(1)^5.

OK, a little misunderstanding here, I thought you meant the exponential base.Anyway, the question is: how to compute exp(5) in 5mins with a pen and a piece of paper?

Aha (= my variant of saying what Paul said in a neighboured thread ...)e1:=exp(1) ~ 2.7, e2:=exp(1)*exp(1) ~ ..., e4:= e2*e2 = ..., exp(5) = e4*e1 ~ 143(assuming one still learns that) with 2 leading correct decimalsThe first version is/was much more interesting for my taste.

Thanks AVt for your answers and you're right: this is probably "first-year undergrad stuff".Still, the answer is 148.41 and I don't know how to get there in 5mins

Peniel, here is an approach based on continued fraction (5 significant figures however, do NOT seem reasonable to me):e^5 ~ 1+10/(-5+t), with t=2+25/(6+25/(10+25/(14+25/(18+25/(22+25/(26+...)))))) - stopping at 26 yields 148.415(used the one with exp(2x/y), by setting x=5,y=2, though i have no idea what the cutoff error is)

I could give a pretty good approximation without using pen and paper, although it's not going to be two decimal digits. I will use the fact that e^3 ~ 20.Knowing that,e^5 ~ 400/e ~ 400/3*(1-0.1) ~ 133.33 *(1 +0.1 +0.01+0.001) ~ 133.33+13.33+1.33+0.13 = 148.12First two additions 133.33+13.33 i could do in a second without pen and paper, so i can easily get 146.66. Beyond that i don't know

if we assume that e = 2.71828 then we can write exp(5) = 2^5 * ( 1.359141)^5 ~ 2^5 * 4^5/3^5 = 134.85

knowledge comes, wisdom lingers

Peniel,the task was "2 decimal places", so 14n.abcd... will do (except you are asked to obey certain rounding rules).And - of course - "any trained mathematician knows that", but without uppish attitude: search for the magicword 'range reduction', the recipe is to reduce to x close to 0 (though it practically not relevant in commonprecision and covered by the HW implementation). That's what I wrote down first (the usual variant is to useapproximations towards 0 instead of alternating series, since that for fixed precision is faster).But I think the only point is range reduction (and rounding rule).

- Cuchulainn
**Posts:**62623**Joined:****Location:**Amsterdam-
**Contact:**

You can use the fact that exp(x+y) = exp(x)exp(y) (school A level?) and induction to show exp(5) = exp(1)^5 = exp(2)^2*exp(1) == exp(2)*exp(2)*exp(1)In order to get two places accuracy I need to take e = 2.71828 and then compute by hand the desired quantity. This can be done long hand. Any less digits will not give the desired result.So, I have to calculate some terms; the fewer the better. So, about 1 minute per computation + a minute for slippage! Or use exp(1) * ... * exp(1) 5 times depending on your speed of execution. There are more opportunies for error. One step wrong and start all over again, whereas if you get exp(2) wrong you get it wrong everywhere!

Last edited by Cuchulainn on September 20th, 2010, 10:00 pm, edited 1 time in total.

Step over the gap, not into it. Watch the space between platform and train.

http://www.datasimfinancial.com

http://www.datasim.nl

http://www.datasimfinancial.com

http://www.datasim.nl

Thanks you for your answers guys.English isn't my mother tongue, so maybe AVt is right -> 2 decimal places means 14*.*** (and not 148.41***).In this case, I like Zerdna's answer (you need to know that e^3~20, though), or I guess you can just take e~2.7 and compute directly e^5 ~ (2.7)^5.Or something like: e^5 ~ 3^5*(1-0.1)^5 ~ 243 * (1 - 0.5 + 0.1 - (0.01)) ~ 243 * 0.6 ~ 145

GZIP: On