Post Reply 
Calculating e^x-1 on classic HPs
01-12-2016, 09:44 PM
Post: #9
RE: Calculating e^x-1 on classic HPs
(01-12-2016 06:30 PM)Dieter Wrote:  
(01-12-2016 03:34 PM)ElectroDuende Wrote:  I suppose that the main reason not to use the program-loop approach is that not all the "classic" models are programmable...

An iterative approach on such a classic calculator would be much slower and require more memory than the suggested method. The two transcendental functions are evaluated faster (and each in one single line of code) than, say, 12 loops of a power series (for 10-digit accuracy), plus the required overhead.

Addendum: I just tried the CF approach in a program for the 41 series. Ten digits require just four loops, but nevertheless the program needs > 3 seconds for the calculation. Compared to this, the method suggested in my initial post returns its result in less than a second – and occupies only 1/3 of the memory.

Dieter

Great, now you have a very elegant solution, with hard proof that it's also speed and memory efficient. Good work.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Calculating e^x-1 on classic HPs - Dieter - 01-11-2016, 10:20 PM
RE: Calculating e^x-1 on classic HPs - Claudio L. - 01-12-2016 09:44 PM



User(s) browsing this thread: 1 Guest(s)