Small RPN exponential routine
|
01-04-2015, 01:14 AM
(This post was last modified: 01-04-2015 02:06 AM by Gerson W. Barbosa.)
Post: #6
|
|||
|
|||
RE: Small RPN exponential routine
(01-03-2015 08:33 PM)Thomas Klemm Wrote:(01-03-2015 05:31 PM)Gerson W. Barbosa Wrote: There surely is a more obvious method which I cannot see, so I won't bother optimizing it. A "little shorter"? I appreciate your sense of humor :-) Definitely I should have made a second attempt in the first place. I've rewritten it looking at the expression with five terms of my example and obtained the same number of steps, but four bytes longer. Despite having one extra step inside the loop, yours appears to be a little faster (only one measurement before I got "Memory Clear" due to flat batteries). Cheers, Gerson. ln(0.52) = -(0.48*(1 + 0.48*(1/2 + 0.48*(1/3 + 0.48*(1/4 + 0.48/5))))) Code:
P.S.: One step less, but still one byte longer, using one of your ideas: Code:
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)