Hello! This is my very first post.
As an Economics major, I get to calculate the growth rate of GDP very often.
Since the growth of GDP is usually not very large, many economists use the relationship
(b-a)/a = ln b - ln a
for small (b-a).
I devised a small program that helps to quickly approximate the growth rate of two different numbers, using the natural log as stated above.
Lbl 1: "Before"? -> A: "After"? -> B: If Not A =< 0 Or B =< 0: Then (ln B - ln A)*100; Else "POSITIVE PLEASE"; IfEnd: Lbl 2: "More"? -> E: If E=1: Then "B -> A"? -> C: If C=1: Then B -> A: "After"? -> B: (ln B - ln A)*100; Goto 2: Else Goto 1: IfEnd: Else Return: IfEnd: ============================================ Comments: (1) * is the multiplication operator (x.) (2) ; is the "triangle" symbol.
I was too lazy to accommodate for possible nonpositive numbers from the codes following Lbl 2.
If you want, you can copy and paste the code handling nonpositive numbers from Lbl 1.
I hope someone finds this program useful.
Thanks for reading!
Edited by kobyeongmin, 30 November 2019 - 12:23 PM.