Post Reply 
Store and reuse intermediate variable
12-20-2022, 07:14 AM
Post: #10
RE: Store and reuse intermediate variable
You could also just duplicate the value with DUP before creating the local variable R:
Code:
« "Ins C t A n" {
":C:
:t:
:A:
:n:
" { 1 0 } V } INPUT OBJ→
→ C t A n
  « 'C*t/100/n/(1-(1+t/100/n)^(-n*A))'
    →NUM "R" →TAG DUP → R
    'R*A*12' →NUM "M" →TAG
  »
»

Just noted that you are now using → NUM instead of →NUM in your listing.
That could be the reason why you got an algebraic result.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Store and reuse intermediate variable - Thomas Klemm - 12-20-2022 07:14 AM



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