Post Reply 
A formula for IRR
05-18-2015, 09:18 PM (This post was last modified: 05-18-2015 09:28 PM by salvomic.)
Post: #24
RE: A formula for IRR
a dirty solution toward the final version...

This program (Home HPPL) recall a #CAS function and present it in Terminal (so when there is a series of cash flows that the "Home" part doesn't handle, the result(s) appear(s) on terminal, while program gives error), and, at the same point, it's possible to edit the list (flows).

Welcome for better solutions!

Code:

EXPORT IRR()
// Thanks Cyrille, Akmon, Dale, salvomic
// cash flow in {flow} list
BEGIN
local mesg;
EDITLIST(flows);
mesg:= irr2();
PRINT(mesg);
RETURN fsolve(ΣLIST(MAKELIST((flows(I)/X^(I-1)),I,1,SIZE(flows))),X)-1;
END;

#cas
irr2():=
BEGIN
fsolve(ΣLIST(MAKELIST((flows(I)/X^(I-1)),I,1,SIZE(flows))),X)-1;
END;
#end

EDIT: If I use RETURN to return directly the result of #CAS function I get something like:
program({},{},[-1.0171... 0.138654...])
a very "ugly" output!

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
A formula for IRR - salvomic - 05-17-2015, 08:47 PM
RE: A formula for IRR - Gene - 05-17-2015, 09:13 PM
RE: A formula for IRR - salvomic - 05-17-2015, 09:19 PM
RE: A formula for IRR - salvomic - 05-18-2015, 08:03 AM
RE: A formula for IRR - akmon - 05-18-2015, 09:20 AM
RE: A formula for IRR - salvomic - 05-18-2015, 09:33 AM
RE: A formula for IRR - salvomic - 05-18-2015, 06:01 PM
RE: A formula for IRR - salvomic - 05-18-2015, 10:27 AM
RE: A formula for IRR - DrD - 05-18-2015, 11:54 AM
RE: A formula for IRR - salvomic - 05-18-2015, 12:31 PM
RE: A formula for IRR - DrD - 05-18-2015, 01:47 PM
RE: A formula for IRR - salvomic - 05-18-2015, 02:08 PM
RE: A formula for IRR - DrD - 05-18-2015, 02:47 PM
RE: A formula for IRR - salvomic - 05-18-2015, 02:56 PM
RE: A formula for IRR - DrD - 05-18-2015, 03:32 PM
RE: A formula for IRR - salvomic - 05-18-2015, 03:45 PM
RE: A formula for IRR - DrD - 05-18-2015, 03:55 PM
RE: A formula for IRR - salvomic - 05-18-2015, 03:57 PM
RE: A formula for IRR - salvomic - 05-18-2015, 05:20 PM
RE: A formula for IRR - salvomic - 05-18-2015, 07:49 PM
RE: A formula for IRR - akmon - 05-18-2015, 07:51 PM
RE: A formula for IRR - salvomic - 05-18-2015, 07:55 PM
RE: A formula for IRR - akmon - 05-18-2015, 10:15 PM
RE: A formula for IRR - salvomic - 05-18-2015 09:18 PM
RE: A formula for IRR - Alfon - 05-18-2015, 10:30 PM
RE: A formula for IRR - salvomic - 05-19-2015, 08:58 AM
RE: A formula for IRR - akmon - 05-19-2015, 10:32 AM
RE: A formula for IRR - akmon - 05-18-2015, 11:07 PM
RE: A formula for IRR - DrD - 05-19-2015, 11:28 AM
RE: A formula for IRR - Didier Lachieze - 05-19-2015, 11:43 AM
RE: A formula for IRR - DrD - 05-19-2015, 12:10 PM
RE: A formula for IRR - DrD - 05-19-2015, 12:05 PM
RE: A formula for IRR - akmon - 05-19-2015, 12:27 PM
RE: A formula for IRR - salvomic - 05-19-2015, 12:33 PM
RE: A formula for IRR - akmon - 05-19-2015, 12:45 PM
RE: A formula for IRR - DrD - 05-19-2015, 12:49 PM
RE: A formula for IRR - Didier Lachieze - 05-19-2015, 01:02 PM
RE: A formula for IRR - salvomic - 05-19-2015, 01:22 PM
RE: A formula for IRR - salvomic - 05-20-2015, 09:25 PM
RE: A formula for IRR - fhub - 05-20-2015, 10:40 PM
RE: A formula for IRR - salvomic - 05-20-2015, 10:48 PM
RE: A formula for IRR - salvomic - 05-21-2015, 06:20 PM



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