SERVING THE QUANTITATIVE FINANCE COMMUNITY

• 1
• 4
• 5
• 6
• 7
• 8
• 37

Cuchulainn
Posts: 61624
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### exp(5) = $e^5$

http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget

gc
Posts: 673
Joined: September 21st, 2002, 10:08 pm

### exp(5) = $e^5$

Wow! I just bumped in this thread almost by chance... I also had an interview with that investment bank in London ages ago, and I didn't get a second interview, let alone a job! :-)I answered many things incorrectly, but exp(5) is the question that many years later I still remember. Reading this thread and the many answers had a liberating effect... thank you for posting the question and the many answers; I thought I was the only one failing so miserably such a simple question....gc

Cuchulainn
Posts: 61624
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### exp(5) = $e^5$

Previously, the Crank Nicolson method was used on [0, 5]. Some modifications:1. Use CN up to t = 1 and then use Pingala to compute e(5).2. Babylonian: the answer lies in the interval [e(4), e(6)]. Big spread.3. Apply Method 2 and then use linear interpolation at t = 5.4. Hybrid (a bit lke Ranncher for PDE); Use CN up to t = 1, Pingala to t = 4 and CN up to t = 5. (this would be a Composite/chain pattern, 1 method on each subinterval).gc,Do you know who the 'originator' is? (Crack, Joshi, Wilmott)
Last edited by Cuchulainn on September 30th, 2011, 10:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget

Cuchulainn
Posts: 61624
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### exp(5) = $e^5$

QuoteOriginally posted by: ExSanIMPROVED EULER'S METHOD -Heun's Formula - Midpoint methodRegular Euler Method: exp( 5 ) ~ 129.1299 error = -12.99 % step = .1Improved Euler Method: exp( 5 ) ~ 147.2699 error = --0.77 % step = .1A few days ago I did the CN for exp(-5) and maybe it is better to use this and then invert to get exp(5).
Last edited by Cuchulainn on September 30th, 2011, 10:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget

Cuchulainn
Posts: 61624
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### exp(5) = $e^5$

The (point) Newton Raphson method was used alreadt but it needs evals of f and f'. Now fixed point method + Aitken for speedup.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget

Cuchulainn
Posts: 61624
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### exp(5) = $e^5$

Here is Interval Newton Raphson method. We get a sequence of contracting intervals (wdth --> 0) so you can keep iterating until they tell you to stop.Very appealing and 100% safe. About 7-9 iterations.
Last edited by Cuchulainn on September 30th, 2011, 10:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget

AVt
Posts: 1074
Joined: December 29th, 2001, 8:23 pm

### exp(5) = $e^5$

Certainly the intended solution was to write it on paper, scan by the phone andask at the www, since a picture is better than some words ...Hmm ... why dont you write it down in some intrinsic way and avoid using a fullylibrary for intervals? Where I am not sure, whether the 'interval' assertion is correct, if you want'the' log, which can be slighty outside, since you compute the 'nearest log'.For example the log of the IEEE value for exp(5) is 4.9999999999999999765...,though it's nearest IEEE representing it is just 5. Very tiny, yes - but see Traden4Alpha in the thread interval arithmeticSo I would not call that an interval method in a strict sense.

Cuchulainn
Posts: 61624
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### exp(5) = $e^5$

QuoteHmm ... why dont you write it down in some intrinsic way and avoid using a fully library for intervals? Well, one reason was to just try the interval Newton Raphson method also works or does it break down To be honest, I ran out of ideas and had a few minutes left to try out.. I have about 7 methods so there cannot be too many left...QuoteCertainly the intended solution was to write it on paper, scan by the phone andask at the www, since a picture is better than some words ...Sorry, youv'e lost me on that one. It was do it in 5 mins on paper??QuoteSo I would not call that an interval method in a strict sense. What would it be called then? Which conditions does it not satisfy?
Last edited by Cuchulainn on October 3rd, 2011, 10:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget

Cuchulainn
Posts: 61624
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### exp(5) = $e^5$

continued fractions
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget

DevonFangs
Posts: 3004
Joined: November 9th, 2009, 1:49 pm

### exp(5) = $e^5$

QuoteOriginally posted by: Cuchulainncontinued fractionsOnce I tried that, the convergence was quite poor.

SierpinskyJanitor
Posts: 1069
Joined: March 29th, 2005, 12:55 pm

### exp(5) = $e^5$

so did the Master, quite successfuly indeed.

DevonFangs
Posts: 3004
Joined: November 9th, 2009, 1:49 pm

### exp(5) = $e^5$

QuoteOriginally posted by: SierpinskyJanitorso did the Master, quite successfuly indeed.I've no idea what this is. Care to explain? Thx.

SierpinskyJanitor
Posts: 1069
Joined: March 29th, 2005, 12:55 pm

### exp(5) = $e^5$

there´s nothing to explain, someone mentioned Continued Fractions and I simply made an honest reference to the Master himself. Some of his notebooks do contain approximations quite similar to the initial challenge posted in this thread. I am just sharing information and apologies if by this I have somewhat interrupted anyone else´s seminal line of thought.

Posts: 23951
Joined: September 20th, 2002, 8:30 pm

### exp(5) = $e^5$

I still think the right answer is 10000.00 base e.

DevonFangs
Posts: 3004
Joined: November 9th, 2009, 1:49 pm

### exp(5) = $e^5$

QuoteOriginally posted by: SierpinskyJanitorthere´s nothing to explain, someone mentioned Continued Fractions and I simply made an honest reference to the Master himself. Some of his notebooks do contain approximations quite similar to the initial challenge posted in this thread. I am just sharing information and apologies if by this I have somewhat interrupted anyone else´s seminal line of thought.That's not what I meant! I still don't know who the Master is, though.

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...

 JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...

GZIP: On