CT_RTOD

 RTOD()
 Converts from a radian to degree measure
------------------------------------------------------------------------------
 Syntax

     RTOD(<nArc>) --> nAngle

 Argument

     <nArc>  Designates a valid angle measurement in radians.

 Returns

     RTOD() returns the value of the designated parameter in degrees.

 Description

     In addition to expressing an angle measurement in degrees, it is often
     useful to express an angle in radians.  RTOD() converts a radian
     measurement into degrees.

 Example

     Show some conversions:

     ? RTOD( PI() )        // Result:  180
     ? RTOD(2 * PI())      // Result:  360
     ? RTOD(4 * PI())      // Result:  720
     ? RTOD( -PI() )       // Result: -180

See Also: DTOR()

 

CT_RATE

 RATE()
 Computes the interest rate for a loan
------------------------------------------------------------------------------
 Syntax

     RATE(<nCapital>,<nPayment>,<nNumberPayments>)
        --> nInterestRate

 Arguments

     <nCapital>  Designates the amount of the loan.

     <nPayment>  Designates the payment per installment.

     <NumberPayments>  Designates the number of the planned payment
     periods.

 Returns

     RATE() returns the loan interest rate.

 Description

     RATE() determines the annual interest rate for a loan <nCapital> in the
     <nNumberPayments> period at the specified <nPayment> installment.  The
     calculated interest rate is based on a Newtonian iterative solution
     procedure:

         lk+1=ik - f(ik)/f(ik)

     where:

         f(i)=(1-(l + i)^-n)/i - PV/PMT

     The initial value for i is selected as follows:

         -io = PMT/PV - PV/n^2PMT

 Note

     .  This function allows a maximum value for the payment period of
        1020.

 Example

     For a $2500 loan, you pay $86.67 per month for 3 years.  What is the
     effective annual interest rate?

     nLoan     :=  2500
     nPayment  :=  86.67
     nPeriod   :=  36

     ? RATE(nLoan, nPayment, nPeriod) * 12      // 0.1501 (15.01%)

See Also: PAYMENT() PV() FV() PERIODS()

 

CT_PV

 PV()
 Computes the cash present value after interest charges
------------------------------------------------------------------------------
 Syntax

     PV(<nPayments>,<nInterestRate>,<nNumberPayments>)
        --> nCapital

 Arguments

     <nPayment>  Designates the amount of the scheduled periodic payment.

     <nInterestRate>  Designates the periodic interest rate.  1
     corresponds to 100%.

     <nNumberPayments>  Designates the number of anticipated payment
     periods.

 Returns

     PV() returns the cash value of an interest yield.

 Description

     PRESENT VALUE
     The function computes the cash value of regular equal payments
     <nNumberPayments> at an <nInterestRate> interest rate over
     <nNumberPayments> payment periods.

 Examples

     .  How high can a loan be if you pay $175 for 24 months, at an
        annual fixed interest rate of 9.5%?  Since payments are monthly, the
        annual percentage rate is divided by 12:

        nRate  :=  0.095/12
        ? PV(175, nRate, 24)     // $3811.43

     .  Annual payments over 2 years at 9.5% per annum:

        ? PV(175, 0.095, 2)      // $305.77

See Also: PAYMENT() RATE() PERIODS() FV()



CT_PI

PI()
 Returns pi with the highest degree of accuracy
------------------------------------------------------------------------------
 Syntax

     PI() --> nPI

 Returns

     PI() returns the pi value with the highest degree of accuracy.

 Description

     This function simplifies calculations when the most accurate pi value is
     required.

 Example

     Show the accurate display for the pi value:

     ? STR(PI(), 18, 15)      // Result:  3.141592653589793

 

CT_PERIODS

 PERIODS()
 Computes the number of payment periods necessary to repay a loan
------------------------------------------------------------------------------
 Syntax

     PERIODS(<nCapital>,<nPayment>,<nInterestRate>)
        --> nNumberPayments

 Arguments

     <nCapital>  Designates the loan amount.

     <nPayment>  Designates the amount of the scheduled periodic payment.

     <nInterestRate>  Designates the periodic interest rate.  1
     corresponds to 100%.

 Returns

     PERIODS() returns the number of payments required to repay the
     <nCapital> amount.

 Description

     PERIODS() computes how often you must make a payment <nPayment> to reach
     the <nCapital> amount at the <nInterestRate> interest rate.

 Note

     .  If the installment payment is smaller than the interest
        amount, repayment lasts forever.  In this case, the function returns
        a value
        of -1.

 Example

     How many months do you need to pay back a $4000 loan at an annual
     interest rate of 9.5%, if you want the $200 monthly payments?

     nRate  :=  0.095/12             // Monthly rate
     ? PERIODS(4000, 200, Rate)      // Number of periods

See Also: PAYMENT() PV() FV() RATE()



CT_PAYMENT

 PAYMENT()
 Computes the periodic payment amount
------------------------------------------------------------------------------
 Syntax

     PAYMENT(<nCapital>,<nInterestRate>,<nNumberpayments>,)
         --> nPayment

 Arguments

     <nCapital>  Designates the loan amount.

     <nInterestRate>  Designates the periodic interest rate.  1
     corresponds to 100%.

     <nNumberPayments>  Designates the number of payments on the loan
     within the payment period.

 Returns

     PAYMENT() returns the payment to make for each payment period.

 Description

     PAYMENT() computes the payment for each period where loan interest
     applies.  The determined amount relates to a loan amount <nCapital> that
     is repaid over <nNumberPayments>, at an interest rate of
     <nInterestRate>.

 Example

     How high does the monthly annuity amount have to be, if you want to
     repay a $2,000.00 loan within 24 months at an annual interest rate of
     10%:

     nRate  :=  0.1/12              // The monthly rate
     ? PAYMENT(2000, Rate, 24)      // 92.29 per month

See Also: PV() FV() RATE() PERIODS()



CT_LOG10

 LOG10()
 Computes the common logarithm
------------------------------------------------------------------------------
 Syntax

     LOG10(<nValue>) --> nLog10

 Argument

     <nValue>  Designates a number for which the base 10 logarithm is
     determined.

 Returns

     LOG10() returns the base 10 logarithm for the <nValue> number.

 Description

     LOG10() determines the common logarithm for a number.

 Note

     .  For non-mathematicians, look at it this way:  to what power
        must 10 be raised (10n) so that <nValue> results?

 Example

     Display common logarithm values:

     ? LOG10(0.01)            // -2.00
     ? LOG10(2)               //  0.30
     ? LOG10(100)             //  2.00
     ? LOG10(INFINITY())      //  308.25

CT_GETPREC

 GETPREC()
 Determines the level of precision that is set
------------------------------------------------------------------------------
 Returns

     GETPREC() returns the level of precision currently installed for
     Clipper Tools trigonometric functions.  The value corresponds to the
     number of digits to the right of the decimal in the range of 1 to 16.

 Description

     GET PRECISION
     GETPREC() queries the currently installed precision level for Clipper
     Tools trigonometric functions.  The returned value corresponds to the
     number of digits to the right of the decimal, that are being worked
     with.  Although the default is 16, you can change this value with
     SETPREC().

 Example

     What precision has been set?

     ? GETPREC()      //  e.g. 10

See Also: SETPREC()



CT_FV

 FV()
 Computes future value of capital
------------------------------------------------------------------------------
 Syntax

     FV(<nInstall>,<nInterestRate>,<nNumberofPayments>)
         --> nCapital

 Arguments

     <nInstall>  Designates the installment amount to pay for the period.

     <nInterestRate>  Designates the interest rate calculated for the
     payment period.  1 corresponds to 100%.

     <nNumberofPayments>  Designates the number of payments.

 Returns

     FV() returns the future capital value of the total deposits, plus the
     interest generated.

 Description

     FUTURE VALUE
     FV() returns the capital available after the <nNumberofPayments> total
     installments at <nInstall> payment, at an <nInterestRate> interest
     charge for the period.

 Example

     What amount would you save, if you pay $150.00 per month for 3 years
     into a fund that pays an annual interest rate of 6%?

     nRate  :  0.06/12         // Monthly interest rate
     ? FV(150, nRate, 36)      // Result: 5900.42

See Also: PAYMENT() PV() RATE() PERIODS()

 

CT_FLOOR

 FLOOR()
 Rounds down to the next integer
------------------------------------------------------------------------------
 Syntax

     FLOOR(<nValue>) --> nSmallerInteger

 Argument

     <nValue>  Designates the number for which the next-smaller integer
     is determined.

 Returns

     FLOOR() returns the next-smaller integer of the one passed as a
     parameter.

 Description

     FLOOR() always returns the next-smaller integer of the one passed as a
     parameter.  This applies to positive and negative numbers.

 Example

     Show the next-smaller integer for positive and negative numbers:

     ? FLOOR(1.9)       // Result:  1
     ? FLOOR(1.1)       // Result:  1
     ? FLOOR(0.9)       // Result:  0
     ? FLOOR(-0.1)      // Result: -1
     ? FLOOR(-0.9)      // Result: -1
     ? FLOOR(-1.1)      // Result: -2

See Also: CEILING()