forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompound.xml
More file actions
46 lines (46 loc) · 2.04 KB
/
Copy pathcompound.xml
File metadata and controls
46 lines (46 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<doc>
<legacy_id>1156</legacy_id>
<name>compound</name>
<type>function</type>
<syntax>
<example>compound(<i>interestPerPeriod</i>,<i>numberOfPeriods</i>)</example>
</syntax>
<library></library>
<objects>
</objects>
<synonyms>
</synonyms>
<classification>
<category>Math, Logic, & Dates</category>
</classification>
<references>
<function tag="annuity">annuity Function</function>
<function tag="round">round Function</function>
</references>
<history>
<introduced version="1.0">Added.</introduced>
</history>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<server/>
<web/>
<mobile/>
</classes>
<security>
</security>
<summary><glossary tag="return">Returns</glossary> the principal plus accrued interest of an investment.</summary>
<examples>
<example>compound(.05,20)</example>
<example>put theInvestment * compound(yearlyInterest,numberYears) into endValue</example>
</examples>
<description>
<p>Use the <b>compound</b> <control_st tag="function">function</control_st> to calculate the value of an investment that earns interest.</p><p/><p><b>Parameters:</b></p><p>The <i>interestRate</i> is a positive number. The <i>interestRate</i> is expressed as a fraction of 1 so, for example, an 8% rate is written<code> .08</code>.</p><p/><p>The <i>numberOfPeriods</i> is a positive number.</p><p/><p><b>Value:</b></p><p>The <b>compound</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a positive number.</p><p/><p><b>Comments:</b></p><p>The formula for the value of an compound-interest-bearing account is</p><p/><p> (1 + <i>interestRate</i>)^( <i>numberOfPeriods</i>)</p><p/><p>The <b>compound</b> <control_st tag="function">function</control_st> calculates this value.</p><p/><p>The <i>numberOfPeriods</i> and the <i>interestRate</i> must use the same unit of time. For example, if the periods are months, the interest rate is the interest per month.</p>
</description>
</doc>