Overview

What is MathU RPN?

MathU RPN is a Reverse Polish Notation (RPN) scientific and financial calculator for the iPhone. The calculator supports double precision accuracy and has 96 functions including 15 financial functions, 4 number bases and 10 statistical functions. There are 20 memory registers.

Technical specifications

Four Keypads

MathU RPN for iPhone supports both a portrait and landscape keypad. Simply rotate the iPhone to switch between landscape and portrait keypads. The keypads also change when transitioning between DEC and HEX, OCT or BIN modes to expose more functions and place A-F on the key tops for easy hex number entry.

What is new in Version 3.2?

Improvements in MathU RPN 3.1

Improvements in MathU RPN 3.0

System Requirements

MathU RPN runs on iPhone, iPad, or iPod touch running iPhone OS (iOS) version 9.3 or higher.

Purchasing

MathU RPN is available exclusively through the App Store.

To purchase, open the App Store within iTunes or on the iPhone. Search for "MathU". Installation happens automatically when you purchase MathU RPN through the App Store.

Legal Stuff

Although care has been taken to insure a bug-free program, Creative Creek, LLC makes no warranty whatsoever, either implied or expressed, as to the correct functioning of this software. When using this software, the user assumes all responsibility for any damages caused, directly or indirectly, by its use.

MathU RPN is copyrighted. Copyright laws apply and the software shall be classified as proprietary material.

When you purchase MathU RPN you are granted a non-exclusive, nontransferable license to use the software and documentation for use in accordance with this License. This License allows use of the software by a single user unless otherwise specified by the description provided at time of purchase.

MathU, MathU RPN and Creative Creek are trademarks of Creative Creek, LLC. iPhone and iPod touch are trademark of Apple Inc. or its subsidiaries.

MathU RPN uses a click sound derived from click 1 d.wav by TicTacShutUp.

Contacting Creative Creek, LLC

See the Creative Creek web site for up-to-date information about MathU RPN. If you have questions, suggestions, bug reports, or you just want to tell us how you much you like MathU RPN you can contact us on the web at http://www.creativecreek.com/.

Preferences

Number of decimal digits

The Digits setting affects the number of decimal digits shown in the display. It does not affect the value of the underlying register. Set it to any number between 0 and 9 to display that many digits. Set it to ALL to display all the digits.

Fixed, scientific or engineering notation

The Format setting affects whether numbers are displayed in fixed notation or scientific or engineering notation (a special type of scientific notation). When using scientific notation, the values are displayed as a significant multiplied by a power of 10. Take for example, the number 12,402.15

Fixed notation example FIX notation

In scientific notation, the value is 1.240215 x 104 and it looks like this

Scientific notation example SCI notation

in the display. Note that the exponent value is in its own separate area on the right of the display.

Engineering notation is similar to the scientific notation except that the exponent is always a multiple of 3. This is quite handy when viewing currency since values will be expressed in thousands or millions, etc. For example, this is the way the example looks in engineering notation

Engineering notation example ENG notation

Regional number formatting

The thousands and decimal separators used to display numbers in MathU RPN follow the region settings within the Settings app on your iPhone or iPad. Open the Settings app and then navigate to General->Language & Region->Region to change how numbers are displayed.

Number base mode

The Number base setting affects both the way numbers are displayed and the operation of some functions (namely +  Χ ÷ CHS and RAND). When a non-decimal base is chosen (HEX, OCT or BIN), the value in the display is converted to an integer and displayed using hexadecimal, octal or binary notation, respectively. You can also choose to display values with leading zeros. See Number Base Overview for details.

When the DEC base is chosen, values are displayed according to the Format setting.

Angle mode

The Angles setting affects the domain for the trigonometric functions. The state of this preference is also indicated in the display. The choices are DEG (degrees), RAD (radians) and GRD (gradians).

Payments due at the beginning or end of each period

The Payments Due setting affects of the timing of payments when performing financial calculations.

When set to BEGIN, the payments are due at the beginning of each compounding period. This is also known as Annuity Due. When this choice is selected, the BEG indicator is turned on in the display.

Annuity Due cashflow diagram

When set to END, the payments are due at the end of each compounding period. This is also known as Ordinary Annuity and used commonly for loans and mortgages. When this choice is selected, the END indicator is turned on in the display.

Ordinary Annuity cashflow diagram

Odd period interest mode

The Odd period int setting determines how any fractional part of the number of periods N is interpreted when using the financial functions. The state of this preference is also indicated in the display. The fractional part of N is interpreted as an odd period that preceeds the first payment. The length of the odd period is that fraction of a period. See Odd Period Computations for more info.

When NONE is chosen, the TVM equations are solved directly with the given N and a non-integer N can be returned when computing N. The odd period indicator will show "N".

When SIMPLE is chosen (the default), the interest during the odd period is computed using the simple interest formula. The odd period indicator will go out.

When COMPOUNDED is chosen, the interest during the odd period is computed using the compound interest formula. The odd period indicator will show "C".

Setting the date format

The Date Format setting affects the way that values are interpreted and displayed as dates. MathU RPN uses a packed numerical format for dates where the digits in the number are interpreted as months, days and years. Two different formats are provided.

When the M.DY format is active (the default), values are interpreted according to the scheme MM.DDYYYY. Thus the value 11.062001 is interpreted as the date November 6, 2001. Note that 4 digit years are required and that 2 digits must be entered for the day. You might also want to set the display to fixed notation with 6 decimal digits so you can see the entire date.

When the D.MY format is active, values are interpreted according to the scheme DD.MMYYYY. Thus the value 11.062001 is interpreted as the date 11 June 2001. When D.MY format is selected, the D.MY indicator will be turned on in the display.

Number of bits for non-decimal bases

The Wordsize setting affects the number of bits to use when the Number Base setting is something other than DEC. Changing the wordsize will not change the current value of the value in the X register, instead it affects the truncation of integers when a subsequent number base function is executed. Values between 1 and 48 are supported.

Number of registers in the stack.

The Stack height affects the number of registers in the stack before it wraps around. You can choose a 4 high stack or a 16 high stack. You may want to set the setting to 4 when you want to perform repeated calculations using a single value. See Repeated Calculations for more info.

Turn on or off button click sounds

When ON button click sounds are played as a button is tapped.

Turn on or off stack labels

When ON stack labels (like X:, Y: etc) are shown.

Lock keypad orientation

When the Lock orientation setting is OFF the calculator keypad will automatically switch between a portrait layout and a landscape layout depending on the orientation of the iPhone or iPod touch. On the iPad, the "rotate" button is used to change the orientation of the keypad.

When the Lock orientation setting is ON the calculator keypad will stop changing when the iPhone or iPod touch moves and will stay with whatever format is active when the setting is turned ON.

Display one or more stack lines

The Display More Stack settings controls whether one, two or four stack lines are shown in the display. When ON, the X and Y stack registers, or the X,Y,Z and T stack registers, are displayed. When OFF, only the X stack register, or X and Y stack registers, are displayed.

The number of stack lines displayed depends on the size of your device's screen and the orientation keypad.

Basic Functions

MathU RPN for iPhone supports both a portrait and landscape keypad. Simply rotate the iPhone to switch between landscape and portrait keypads. On the iPad, press the "rotate" button to switch between landscape and portrait keypads.

MathU RPN is based on Reverse Polish Notation (RPN). RPN differs from standard algebraic notation in that the numbers to be operated on are pushed onto a stack and then executed upon by a function. MathU RPN has a 16 or 4 element stack. In both cases, the first four elements of this stack are referred to by the names x,y,z, and t.

The value of the x register is what is displayed.

RPN works similar to the way you were probably taught to add numbers:

  1. First you wrote the two numbers above each other like this:
    5
    7
    --
    
  2. Then you added the operator and wrote down the answer (I'm skipping the calculation part in your head)
     5
    +7
    --
    12
    

In RPN, you place the two numbers on the stack. To set up the same problem as above, the keystrokes are 5 ENTER 7. This produces the stack picture:

Stack with 5 and 7

just like what you put on the paper. The ENTER key pushes the current value up on the stack and allows you to put a new number in its place (The empty boxes will contain the values from previous calculations).

When you hit + the two values are added together. The + key always adds the x and y registers together and then places the result into x:

Stack with result = 12

All the functions in MathU RPN work like this using values on the stack. Some like + work with x and y while others like SIN just use the value in the x register and replace it with the result. In this documentation, the former are called binary functions while the latter are called unary functions.

Hence the operation

12.5 + 7

is keyed as

1 2 . 5 ENTER 7 +

where ENTER key is used to separate the two values.

Most buttons on MathU RPN can access three functions. The function or number on the top of each button in white is accessed without shifts. The function just above the button in gold is accessed by pressing the f-shift key f before pressing the button (The f-shift indicator will light in the display when the f-shift is active). Similarly, to access the functions on the front of the buttons in blue use the g-shift key g. The g-shift indicator will light in the display when the g-shift is active.

Most functions remember the last x register value used during a computation. This value can be accessed via the LSTX function.

Entering Numeric Values

A numeric value is entered tapping the digits keys 0 through 9 and the decimal . in sequence from left to right. Any thousands separator (if present) is not entered. However, MathU RPN automatically adds the thousands separator as you enter the number to aid entry. As an example (in US region), the number 12,350.78 is entered using the keystokes

1 2 3 5 0 . 7 8

Entering negative numbers

You can change the sign of a number by tapping the CHS key. Negative numbers are entered by following the digits by the CHS key. For example, to enter the value -4.12 you would tap

4 . 1 2 CHS

Correcting mistakes

If you make a mistake while entering a number, tap to remove the last digit entered or CLX key to clear the entire x register and then enter the correct value.

Alternatively, you can recall the last x value used in a computation via g LST&nbrsp;X and then apply the inverse of the last operand. For instance, if you mistakenly subtracted a number (even if you don't remember which number you subtracted), you can recall it using LST&nbrsp;X and add it back in using +.

Entering very large or very small values in scientific notation

To enter a large value in scientific notation, use the EEX (enter exponent) key to separate the mantissa and exponent. For example, the keystrokes,

1 . 3 5 EEX 1 9

is used to enter the value 1.35×1019

Sometimes scientific notation is also written as 1.35e19 where the "e" indicates the following numbers are part of the exponent. Small numbers like -6.52×10-8 (or -6.52e-8) are entered similarly except that the CHS is tapped after the exponent digits are entered.

6 . 5 2 CHS EEX 8 CHS

Note that in order to enter a negative small number you must use CHS twice: Once after the mantissa is entered and before EEX is tapped, and then again after the exponent is entered.

Simple Arithmetic

To add two numbers together using the RPN entry system, you first enter the two numbers you would like to add followed by the + key. Separate the numbers with the ENTER key like this

5 ENTER 4 +

which computes the addition of 5 and 4 by "applying the + function to the two values on the stack".

Effect of PLUS on the stack

Note that the stack drops when the addition is performed. If the 4 high stack is being used the t stack value is replicated. The result is placed into the x register. All of the arithmetic operators (+  × ÷) work like this. They pull their values from the stack and push the result onto the stack

Executing functions

Most buttons on the MathU RPN keypad can execute 3 functions. Tapping the key by itself executes the function drawn in white on the top. To access the gold or blue functions press the f or g shift keys first.

For example, the key labeled 1 enters the digit 1 when tapped directly, the f ex exponential function when preceeded by f or the g LN natural logarithm function when preceeded by g.

When you press f or g an f or g will show in the display. To cancel either shift prefix, tap f.

Entering Formulas using RPN

MathU RPN uses the Reverse Polish Notation (RPN) entry system to enter and compute its results. While it takes some time to get used to, your confidence in the computed results will improve as you master RPN. The reason for this is that all the partial results are displayed as you work your way through a complicated formula.

As an example of a complicated formula, let's compute the US interest rate for a Canadian mortage where interest is compounded semi-annually instead of monthly. The formula is

US_Rate = 1200 × ((1 + Can_Rate÷200)(1/6) - 1)

The key to computing this using the RPN system is to work from the inside out. Thus start with the innermost parentheses and work your way out. You must also remember that, by convention, multiplication and division have higher precedence so perform those first. Here are the keystokes and stack values displayed as the formula is computed for a Canadian mortgage at 6.25%:

KeystokesDisplay 
6.25 ENTER6.25 Canadian interest rate
200200  
÷.03125 Semi-annual interest rate
11  
+1.03125 Inner parenthetized expression
6 f 1/x 0.16667 Power
yx1.00514 Partial result
11  
-0.00514 Next partial result
1200 1,200  
× 6.17014 U.S. Mortgage Rate

Note that partial results are displayed as the computation proceeds. Because of this, you have a chance of seeing an error early on while it is still easy to back-up, recover and continue. That is the power of the RPN approach.

Copy and Paste

MathU RPN supports copying and pasting numbers from other applications on the iPhone, iPad or iPod touch. To copy the value currently displayed, double tap the display and then select "Copy" from the menu that pops up.

Copy and Paste

To paste a value into the display that was copied from another application, double tap the display and choose "Paste". If "Paste" is not available, it means that the system pasteboard does not contain a number recoginizable to MathU RPN.

Stack and Registers

The Registers

MathU RPN has 25 registers -- 10 primary registers, 10 secondary registers and 5 financial registers. The registers are shared in that they can be used to store your own values but they are also used by some of the functions on the calculator. Namely, all 20 primary and secondary storage registers may be used to store up to 20 cash flows and some of the secondary registers are used to store values for the statistical functions (see picture below). MathU RPN also has five additional registers dedicated to the financial functions N, i, PV, PMT and FV.

Register assignments

To safely store values in the registers while still performing cash flow analysis, store your values in the uppermost registers. The cash flow functions use registers 0-n where n is the number of cash flows. All registers greater than n will be available.

To safely store values in the registers while still accumulating statistical sums, store your values in the registers 0-9 or registers 17-19. This avoids the registers shared with the statistics functions.

The 10 primary registers are accessed by pressing STO or RCL followed by the register number 0 through 9. To access the secondary registers (registers 10 through 19) press STO . followed by the register number 0 through 9. The financial registers are accessed by pressing STO or RCL followed by the financial function (N, i, PV, PMT or FV).

Show Registers

Tap RCL RCL to display the stack and registers in a scrolling list.

Register and stack list

Tap the Done button to return to the keypad.

Accessing the Registers

Register assignments

The 10 primary registers are accessed by pressing STO or RCL followed by the register number 0 through 9. To access the secondary registers (registers 10 through 19) press STO . followed by the register number 0 through 9. The financial registers are accessed by pressing STO or RCL followed by the financial function (N, i, PV, PMT FV, CF0, CFj or Nj).

When RCL is pressed, the value from the register is pushed onto the stack:

As a special case, RCL Σ+ recalls the sum of x (Σx) and sum of y (Σy) into the x and y registers respectively (overwriting the stack x and y positions):

Storage Register Arithmetic

You can perform arithmetic computations as you store a value in a register. For example,

STO + 4

adds the current value of the x register to storage register 4. Similarly,

STO  4

STO × 4

STO ÷ 4

subtracts, multiplies or divides the current value of the x register from the value in storage register 4. The result is placed into storage register 4.

Register arithmetic works with the primary and secondary registers as well as the financial registers.

Clearing the Registers

MathU RPN supports several functions that clear the registers

To clear the stack, tap f CLSTK.

To clear the registers, tap f CLREG.

To clear only the financial registers and reset the odd period int and annuity modes, tap f CLFIN.

To clear only the statistics registers, tap f CLΣ.

To clear only the x stack register, tap CLX.

Last X

MathU RPN automatically remembers the last x value used in a computation. You can recall the last x value by tapping LST X:

The Stack

The stack is central to the working of the RPN (Reverse Polish Notation) entry system. Most functions on the calculator pull their values from the stack and push their results onto the stack.

Stack

MathU RPN has a 4 or 16 high stack (depending on the Stack Height preference). As shown in the picture, the first four registers that make up the stack are given the names x, y, z and t. The value of the x register is shown in the display. If you have the Show More Stack setting ON, then both the x and y registers (and maybe all four) are displayed.

Unary vs. binary functions

Some functions (like 1/x) use only the x register to compute their value. Other functions (like yx) use both the x and y registers to compute their result. The first type of function is called a unary function while the second type is called a binary function.

The ENTER key

During number entry, the ENTER key is used to indicate the end of one number and the beginning of the next one. Its effect on the stack is to push a copy of the current x register onto the stack.

The effect of ENTER on the stack

Note how all the other stack registers are moved up as well. The ENTER function also readies the x register to be overwritten by the next value. As soon as you tap a number, the x register is replaced.

Stack Manipulation

To clear the x stack register, tap CLX.

To exchange the contents of the x and y register (say for example to place the divisor into the x register), tap x<>y.

Effect of x<>y on stack

To roll the stack down, tap R↓.

Effect of ROLLDOWN on stack

To roll the stack up, tap R↑. The top of the stack will wrap around to become x.

Effect of ROLLUP on stack

To push the current x value into the y register, tap ENTER.

Effect of ENTER on stack

While entering a number, the undo key undoes the last character, otherwise it clears the x register (the same as CLX).

Repeated Calculations

When a binary computation is performed that causes the stack to drop, the topmost register is automatically replicated. You can take advantage of this behavior to do repeated calculations. It works with either the 16 or 4 high stack but is probably easier to take advantage of with a stack height of 4 (see Stack Height for how to switch between the two).

To perform a repeated calculation, load the stack completely with the common value and then enter the first value and apply the operand. Press the operand again to compute the next number in the series. Repeat for each number in the series.

Example: To generate a series of numbers that differ by 3:

KeystokesDisplay 
33Load stack with the difference
ENTER3.0  
ENTER3.0  
ENTER3.0 Now the entire stack is filled with 3.0
22Enter a starting number
+5.0 
+8.0 
+11.0 
+14.0etc.

At the end of the series of computations the stack looks like this

Stack after series of repeated computations

where the difference (3.0) continues to be replicated as the stack drops with each computation.

A similar approach can be used with any binary function like +, -, ×, or ÷.

Financial Functions

Financial Functions Overview

The financial functions are governed by the equation,

PV*(1+i)N + PMT/i*((1+i)N−1) + FV = 0

This equation is used when the annuity mode (BEGIN/END preference) is set to ordinary annuity (payments due at the end of the period: END). When the annuity mode is annuity due (payments due at the beginning of the period: BEG) then PMT in this equation is modified to be PMT * (1 + i).

The financial functions have two modes: input mode and calculation mode. MathU RPN is in input mode if a number has been keyed into the calculator or any non-financial functions have been executed. Executing one of the main financial functions

N, i, PMT, PV, or FV

stores the displayed value in the associated financial register. MathU RPN is in calculation mode after any financial functions have been executed and before any other functions that change the stack are executed. The result of a financial computation is pushed onto the stack:

Effect of financial functions on stack

Most of the time this should behave as you would expect. However, if for some reason MathU RPN stores a value when you intended to compute one, simply execute the financial function again to obtain the desired result.

Cash Flow Convention

Financial problems can be thought of as a series of cash flows. For example, a mortgage consists of a large positive cash flow (the loaned amount) followed by a series of monthly negative cash flows (the payments) with possibly a final negative cash flow at the end (the balloon payment). The diagram below illustrates this situation.

Ordinary annuity cash flow diagram

Positive cash flows (amounts you receive) are shown as upward pointing arrows. Negative cash flows (amounts you pay) are shown as downward pointing arrows. The horizontal axis of the diagram is time, with time increasing to the right. The time between the equally spaced payments is called the period.

For the problem to be solvable with MathU RPN, there must be at least one cash flow in each direction. It is always possible to add a present value or future value cash flow to meet this requirement. Think about your problem to determine which is more appropriate.

Mortgages Overview

Mortgages and Loans are a type of Time Value of Money (TVM) computation where payments are due on a regular schedule. For example, a mortgage consists of a large positive cash flow (the loan amount) followed by a series of monthly negative cash flows (the payments) with possibly a final negative cash flow at the end (the balloon payment). The diagram below illustrates this situation.

Ordinary annuity cash flow diagram

Example 1: Suppose you are interested in determining the payment for a car loan of $18,500 at 7.25% interest for 5 years. The keystrokes to solve this problem using MathU RPN are

Keystokes Display  
f CLFIN   Reset the financial registers
ENTER 5 Number of periods (in years)
12 × N 60 Set the number of periods (in months)
7.25 ENTER 7.25 Interest rate per year.
12 ÷ i .60417 Set the interest rate per month
18500 PV 18,500. Set the pricinpal or present value of the loan
PMT -368.51 Compute the payment per period. The value is negative because the payments are made in the opposite cash flow direction from the principal.

Note: The convenience functions 12x and 12÷ could have been used in steps 2 and 4 to replace the keystrokes

12 × N and 12 ÷ i

respectively.

Example 2: What is the payment if you are willing to pay a balloon payment of $2,000 at the end of the loan?

Keystokes Display  
2000 CHS FV -2,000.00 Set the future value (balloon payment). The value is negative because this is money you will pay out.
PMT -340.75 Compute the new payment per period.

Example 3: How much interest do you end up paying with the balloon payment?

Keystokes Display  
N PMT × -20,445.17 Total of all payments.
RCL FV + -22,445.17 Total payments including balloon payment.
RCL PV + -3,945.17 Add loan value to obtain the total paid in interest.

Example 4: To compute the effective interest rate in an IRA account that you put $2000 into each year, you will need to enter the yearly payments as well as the current value of the account as a positive future value (FV) even though you haven't sold the assets in the account. To make the example concrete, suppose that you started your IRA in 1985 with a $10,000 rollover and that the value in the account is $80,000 in the year 2001.

Keystokes Display  
f CLFIN   Reset the financial registers
2001 ENTER 2,001. To start with, determine the number of compounded years. Enter the ending year.
1985  N 16. Subtract starting year and then set the number of periods (in years).
10000 CHS PV -10,000. Set the starting value for the account. The value is negative since you paid into the account with the rollover.
2000 CHS PMT -2,000. Set the annual contribution as the payment.
80000 FV 80,000. Set the curent value of the account. The value is positive since this is money you would receive if you sold all the assets in the account.
i 6.39 Compute the effective annual rate of return in the account, i.e. 6.39%.

Number of Periods

The N function is used to store or compute the number of periods in a mortgage or loan. Enter a number and then tap N to store a value in the financial N register. If no value is entered, tapping N will compute the number of periods based on the values in the other financial registers. See Mortgages and Loans for details.

While you can store a non-integer value in N, the value computed by N is always an integer (unless you set the Odd Period Int preference to NONE). For information on how to work with loans that involve a odd-length first period see Odd Period Loans.

STO N stores the current value of the x register into the N register. Storage register arithmetic like STO + N also works.

RCL N pushes the value of the N register onto the stack.

The function 12× can also be used to store 12 times the current x value into the N register. It makes it easier to enter the number of periods in a monthly mortgage using the number of years in the loan.

Compound Interest

The i function is used to store or compute the interest rate in a mortgage or loan. Enter a number and then tap i to store a value in the financial i register. If no value is entered, tapping i will compute the interest rate based on the values in the other financial registers. See Mortgages and Loans for details.

STO i stores the current value of the x register into the i register. Storage register arithmetic like STO + i also works.

RCL i pushes the value of the i register onto the stack.

The function 12÷ can also be used to store 1/12 of the current x value into the i register. It makes it easier to enter the interest rate per period for a monthly mortgage based on the annual interest rate.

Payment per period

The PMT function is used to store or compute the payment per period for a mortgage or loan. Enter a number and then tap PMT to store a value in the financial PMT register. If no value is entered, tapping PMT will compute the payment per period based on the values in the other financial registers. See Mortgages and Loans for details.

STO PMT stores the current value of the x register into the PMT register. Storage register arithmetic like STO + PMT also works.

RCL PMT pushes the value of the PMT register onto the stack.

Principal (Present) Value

The PV function is used to store or compute the principal or present value for a mortgage or loan. Enter a number and then tap PV to store a value in the financial PV register. If no value is entered, tapping PV will compute the principal value based on the values in the other financial registers. See Mortgages and Loans for details.

STO PV stores the current value of the x register into the PV register. Storage register arithmetic like STO + PV also works.

RCL PV pushes the value of the PV register onto the stack.

Future Value (Balloon)

The FV function is used to store or compute the future value or balloon payment for a mortgage or loan. Enter a number and then tap FV to store a value in the financial FV register. If no value is entered, tapping FV will compute the future value based on the values in the other financial registers. See Mortgages and Loans for details.

STO FV stores the current value of the x register into the FV register. Storage register arithmetic like STO + FV also works.

RCL FV pushes the value of the FV register onto the stack.

Simple Interest

The INT function is used to compute accrued interest on both a 360-day and 365-day basis. The function uses values in the N, i, and PV to define the problem.

  1. Enter the number of days, then press N.
  2. Enter the annual interest rate, then press i.
  3. Enter the principal amount (as a negative number), then press PV.
  4. Tap f INT to compute the accrued interest. The interest based on a 360-day year is placed into the x register and the interest based on a 365-day year is placed into the z register. The negative of the principal amount is placed into the y register.
  5. Tap R↓ x<>y to view the 365-day interest
  6. Tap + to add the principal + accrued interest together.

Odd Period Computations

When N is not an integer, MathU RPN treats the fractional part of N as an intial odd period. The odd period is the fraction of a period between the date interest begins to accrue and the beginning of the first payment period. By default, the interest during the odd period is computed using the simple interest formula:

odd period interest = interest rate per period * odd fraction of a period

Compound interest can also be used by setting the "Odd Period Int" preference to COMPOUNDED (C indicator will turn on in the display). When the C or N indicator is not on, simple interest is used.

When the "Odd Period Int" preference is set to NONE (N indicator will turn on in the display), the TVM equation is solved directly with the given N and, when computing N, a non-integer N can be returned.

Odd period computations are taken into account when computing i, PV, PMT and FV. Except when NONE is set, the computation of N always rounds up to the nearest whole period so, to take advantage of the odd period computations, you must explicitly store a non-integer value in N.

Because the number of periods is rounded up, the final payment may be smaller than the previous N-1 payments.

Example: You take out a 3 year loan for $2,000 at 5% interest on Apr 3, 2001 but the first loan period doesn't start until Apr 15, 2001. The first 15−3 = 12 days are an odd period. Simple interest is accrued during those first few days. Compute the monthly payment. For comparison purposes, also determine the payment without the odd period.

Keystokes Display  
f CLFIN   Reset the financial registers.
2000 PV 2,000. Set the amount of the loan.
5 12÷ .4167 Set the interest rate per month.
3 12× 36. Set the period of the loan (without the odd period).
PMT -59.94 Compute the monthly payment without taking into account the odd period.
4.032001 ENTER 4.032001 Even though this example is simple, let's use the ΔDYS function to compute the number of days in the odd period. Enter the initial date (assuming the date format setting is M.DY).
4.152001 4.152001 Starting date of loan (end of odd-period)
g ΔDYS 12. Compute the number of days in the odd period.
30 ÷ 0.4 Fractional odd period (using a 30 day month basis)
STO + N 36.4 Add odd period to N.
PMT -60.04 Monthly payment taking into account the odd period (with simple odd-period interest).

Amortization

The entries in an amortization table can be computed using AMORT. An amorization table shows how each payment is split between interest and principal as payments are made. It also shows the remaining principal in the loan. Here is an example amortizaton table:

Amortization Table
Period Interest Principal Payment Remaining Principal
1 $-111.77 $-256.74 $-368.51 $18,243.26
2 $-110.22 $-258.29 $-368.51 $17,984.97
3 $-108.66 $-259.85 $-368.51 $17,725.12
4 $-107.09 $-261.42 $-368.51 $17,463.70

AMORT computes the amount paid against the principal and the amount of interest paid for a series of payments and bases its calculation on the values in the financial registers. It also updates the PV register to keep track of the remaining principal and updates N to keep track of the payments made so far.

The AMORT function pushes the amount paid in interest into the x register and the amount paid against the principal into the y register. x+y will always equal PMT. This leaves the number of payments just amortized in the z register:

Amortization stack picture

In addition, the financial N register and the financial PV register are updated to contain the total number of periods amortized so far and the remaining balance. Because of this, the rows in the amortization table can be computed by repeatedly executing AMORT.

Follow these steps to compute rows of the table:

  1. Fill in the financial registers with the information for a loan. You must fill in i, PV and PMT before starting an amortization. Filling in FV is optional. Normally you start by computing these things for a particular loan. Another way to start is to use the loan information from the lender or from a mortgage statement.
  2. Initialize the amortization by storing the payments made so far into the N register. Usually you would start by storing 0 into the N register unless you have already made several payments.
  3. Enter the number of periods to amortize into the x register. Typically, this will be 1 to compute the amorization for one period or 12 to compute the amortization for a year of monthly payments.
  4. Tap f AMORT to compute a row of the amortization table.
  5. Use x<>y to switch between viewing the interest or principal split.
  6. The remaining principal is left in the PV register (accessible via RCL PV or viewable above the PV button).
  7. The number of payments made so far is left in the N register (accessible via RCL N or viewable above the N button).
  8. Repeat steps 3 and 4 to compute successive rows of the table.

Note: The AMORT function automatically rounds its results based on the digits preference setting. This could result in answers that differ slightly (by a few cents) from the amortization performed by your lending institution (since they might be using a different rounding rule).

Example: Suppose you are interested in determining the amortization table for a car loan of $18,500 at 7.25% interest for 5 years. Here are the first few entries in the amortization table:

Amortization Table
Period Interest Principal Payment Remaining Principal
1 $-111.77 $-256.74 $-368.51 $18,243.26
2 $-110.22 $-258.29 $-368.51 $17,984.97
3 $-108.66 $-259.85 $-368.51 $17,725.12
4 $-107.09 $-261.42 $-368.51 $17,463.70

Before beginning, set the number of digits to round the result by changing the Digits preference. For dollars and cents, a Digits setting of 2 is normally used.

To compute the amortization table values:

Keystokes Display  
f CLFIN   Clear the financial registers.
18500 PV 18,500.00 Set the current amount due on the loan (principal value).
7.25 12÷ 0.60 Set the monthly interest rate.
12× 60.00 Set the number of months (periods) in the loan.
PMT -368.51 Compute the monthly payment.
N 0.00 Set N to the number of payments made so far.
AMORT -111.77 Enter the number of payments to amortize and then execute AMORT. In amount paid in interest is shown.
x<>y -256.74 View the amount paid against the principal.
RCL PV 18,243.26 View the remaining principal balance.
RCL N 1 View the number of payments so far.
AMORT -110.22 Enter the number of payments to amortize and then execute AMORT again to get the next row.
x<>y -258.29 View the amount paid against the principal.
RCL PV 17,984.97 View the remaining principal balance.

Repeat the last three steps to get the remaining rows of the table.

Make sure the annuity (payments due) preference is set to BEG for annuity due loans or END for ordinary annuity loans.

Discounted Cash Flows

MathU RPN includes functions to compute the Internal Rate of Return (IRR) and Net Present Value (NPV) of a series of cash flows. The cash flows must occur at regular intervals but the value of each cash flow can be different. A cash flow can be zero. You use the cash flow functions CF0, CFj and Nj to define them.

Unequal cash flows diagram

Positive cash flows (amounts you receive) are shown as upward pointing arrows. Negative cash flows (amounts you pay) are shown as downward pointing arrows. The horizontal axis of the diagram is time, with time increasing to the right. The time between the equally spaced payments is called the period.

Up to 20 cash flows can be entered. Bigger problems can be solved if there are repeated equal cash flows. In this case, enter the number of consecutive cash flows (Nj) just after entering the cash flow (CFj). Up to 20 distinct cash flow amounts can be entered.

Repeated cash flows

For the problem to be solvable with MathU RPN, there must be at least one cash flow in each direction. Not all cash flow situations have a solution. Depending on the values and the timing of the cash flows there could be a single solution, multiple solutions, or no solution. If no solution is found, an error "-e-" is displayed.

Entering Cash Flows

To enter cash flows:

  1. Clear the financial and cash flow registers using CLREG
  2. Enter the initial cash flow value and then execute CF0 to store the value.
  3. For each cash flow, enter the value and then execute CFj to store the value. If the cash flow is repeated, enter the number of repeated cash flows and execute Nj to store the count.
  4. Perform step 3 for all the remaining cash flows.

The cash flows are stored into registers 0 through 19. If there is a 20th cash flow, it is stored into the financial FV register. The counts are stored in hidden registers in the calculator. The total number of cash flows is stored in the financial N register.

Reviewing The Cash Flows

You can review the cash flow counts and their values by storing the number of the cash flow to be reviewed in the financial N register (STO N) and executing RCL Nj and RCL CFj. Each time RCL CFj is executed, the financial N register is decremented. Repeated executions of RCL CFj will display each cash flow in reverse order. Remember to reset the financial N register to the total number of cash flows before executing NPV or IRR.

You can also access the cash flows by directly recalling them from the storage registers using RCL n or RCL .n or by displaying all the registers using RCL RCL.

Internal Rate of Return

The internal rate of return (IRR) is the discount rate where the net present value is zero. MathU RPN computes the internal rate of return based on the cash flows entered via CF0, CFj and Nj (see Entering Cash Flows). To compute the IRR, enter the cash flows and then execute the IRR function. The interest rate in percent per period is pushed onto the stack and also stored in the financial i register.

Example: Suppose the six cash flows depicted in the following diagram illustrate the cash flows possible from an investment property. An initial investment in the amount of $-10,000 (CF0) is used to buy the property which nets $4,000 (CF1), $2,000 (CF2), $3,500 (CF3), $6,000 (CF4) and $4,000 (CF5) for 5 years. What is the internal rate of return (IRR)?

Unequal cash flow example

Keystokes Display  
f REG   Clear the financial and cash flow registers.
10000 CHS Cf0 10,000. Enter the initial cash flow.
4000 CFj 4,000. Enter the first cash flow.
2000 CFj 2,000. Enter the second cash flow.
3500 CFj 3,500. Enter the third cash flow.
6000 CFj 6,000. Enter the fourth cash flow.
4000 CFj 4,000. Enter the fifth cash flow.
RCL N 5. Check the total number of periods.
f IRR 25.1837 Compute the Internal Rate of Return.

Net Present Value

The net present value (NPV) is the discounted value of a series of cash flows in the future. MathU RPN computes the internal rate of return based on the cash flows entered via CF0, CFj and Nj (see Entering Cash Flows). The discount rate used is taken from the financial i register. Once the cash flows have been entered, enter the desired discount rate in percent using STO i and then execute NPV. The net present value is pushed onto the stack and also stored in the financial PV register.

If the net present value is positive, then the series of cash flows produce a better return than the assumed discount rate. Conversely, a negative net present value indicates that the return is worse than the assumed discount rate. Use IRR to compute the actual discount rate implied by the series of cash flows.

Example: Suppose that you wish to compare two investments. The first investiment opportunity involves the six cash flows depicted in the following diagram from an investment property. An initial investment in the amount of $-10,000 (CF0) is used to buy the property which nets $4,000 (CF1), $2,000 (CF2), $3,500 (CF3), $6,000 (CF4) and $4,000 (CF5) for 5 years.

Unequal cash flow example

The second investment opportunity is expected to return a minimum of 10% over the next 5 years. To determine which investment is better, compute the NPV of the first investment using the discount rate possible with the second investment. If the NPV is positive, the first investment is better. If the NPV is negative, the second investment will provide better returns.

Keystokes Display  
f CLREG   Clear the financial and cash flow registers.
10000 CHS Cf0 10,000. Enter the initial cash flow.
4000 CFj 4,000. Enter the first cash flow.
2000 CFj 2,000. Enter the second cash flow.
3500 CFj 3,500. Enter the third cash flow.
6000 CFj 6,000. Enter the fourth cash flow.
4000 CFj 4,000. Enter the fifth cash flow.
RCL N 5. Check the total number of periods.
10 STO i 10. Enter the desired discount rate.
f NPV 4,950.68 Compute the Net Present value by executing NPV.

Since the NPV value is positive, the first investment is better than the second investment.

Date and Time Functions

Days between dates

The ΔDYS function is used to compute the number of days between dates.

  1. Enter the first date in MM.DDYYYY or DD.MMYYYY format (depending on the current date format then tap ENTER.
  2. Enter the second date . MM.DDYYYY or DD.MMYYYY format
  3. Tap g ΔDYS. The actual number of days between the dates is stored in the x register. In addition, the number of days between the dates using a 30 day per month basis is stored in the y register.
  4. Tap x<>y to view the number of days between the days based on a 30 day month.

Past or future date and day of the week

The DATE function is used to determine the date that is a given number of days from a starting date. It also computes the day of the week of the resulting date.

  1. Use the preferences to set the calculator to your desired date format. M.DY (the default) or M.DY.
  2. Enter the starting date in MM.DDYYYY or DD.MMYYYY format and then tap ENTER.
  3. Enter the number of days to offset from the starting date. Enter positive numbers for dates in the future and negative numbers for dates in the past.
  4. Tap f DATE to determine the future or past date. The date will be displayed in a special format with the month, day and year separated by the thousands separators and with an extra digit at the right of the display (in the exponent area) that indicates the day of the week. 1=Monday and 7=Sunday.
  5. To determine just the day of the week for a given date, use an offset of 0.

Convert fractional hours to H.MS format

The H.MS function converts x stack value from fractional hours to H.MS format.

In H.MS format (HH.MMSS), the integer part of the value is the number of hours while the fractional part is broken into two fields: M, the minutes, and S, the seconds. Each field comprises two digits of the fraction. For example, the number 2.03165 is interpreted as 2 hours, 3 minutes, 16.5 seconds or 2°3'16.5" using standard degrees, minutes, seconds notation. Thus, the H.MS interpretation is also valid for D.MS as well.

When using the H.MS and HOUR functions it is usually helpful to set the number of digits displayed to be 4 or greater.

Convert H.MS format to fractional hours

The HOUR function converts the x stack value from H.MS (HH.MMSS) format to fractional hours.

In H.MS format (HH.MMSS), the integer part of the value is the number of hours while the fractional part is broken into two fields: M, the minutes, and S, the seconds. Each field comprises two digits of the fraction. For example, the number 2.03165 is interpreted as 2 hours, 3 minutes, 16.5 seconds or 2°3'16.5" using standard degrees, minutes, seconds notation. Digits after the fourth fractional digit are interpreted as fractions of a second. Thus, the H.MS interpretation is also valid for D.MS as well.

When using the H.MS and HOUR functions it is usually helpful to set the number of digits displayed to be 4 or greater.

Percentage Functions

Percent

Use the % function to compute the x percentage of a base value y.

  1. Enter the base value and then tap ENTER.
  2. Enter the percentage.
  3. Tap % to compute amount corresponding to the desired percentage of the base value. The base number will be left in the y register.

Effect of percent on the stack

Discounts and Markup

Since the percent function leaves the original base amount in the y register, a markup or discount is easy to apply. Simply compute the percentage amount first then tap + or to add or subtract the percentage amount from the base value.

Example: Find the total cost of an item costing $950 including tax computed at 8.3%.

Keystokes Display  
950 ENTER 950.00 Enter the base value.
8.3 8.3 Enter the precentage. Note that you do not need to convert the percentage into the equivalent fractional value (0.083 in this case). Enter the value in percent directly.
% 78.85 Compute 8.3% of 950.00
+ 1,028.85 Markup (add) the percentage to the base value.

Percent Change

Use the %CH function to compute the percentage difference (change) between two values.

  1. Enter the first value and then tap ENTER.
  2. Enter the second value.
  3. Tap %CH to compute percentage difference between the two values. The result is placed into the x register.

Effect of percent change on the stack

Example: Find percentage gain on an investment that appreciated from an initial value of $1,248 to $1,315.

Keystokes Display  
1248 ENTER 1,248.00 Enter the initial value.
1315 1,315 Enter the second value.
%CH 5.37 Compute the percentage gain for the investment. The number is positive when the second number is greater than the first. It will be negative (a loss) if the second number is less than the first.

Scientific Functions

Y to the X power

The yx function computes y to the x power. The result is pushed on the stack.

Effect of binary function on the stack

Square root

The √x function computes the square root of x. The result replaces the x value on the stack.

Effect of unary function on the stack.

X Squared

The X2 function computes the square of x. The result replaces the x value on the stack.

Effect of unary function on the stack.

Exponential

The ex function computes e to the x power where e is the base of the natural logarithm. It is the inverse of the LN function. The result replaces the x value on the stack.

Effect of unary function on the stack.

Natural (base e) logarithm

The LN function computes the natural logarithm of x. It is the inverse of the ex function. The result replaces the x value on the stack.

Effect of unary function on the stack.

Ten to the x power

The 10x function computes 10 to the x power. It is the inverse of LOG function. The result replaces the x value on the stack.

Effect of unary function on the stack.

Base 10 logarithm

The LOG function computes the base 10 logarithm of x. It is the inverse of the 10x function. The result replaces the x value on the stack.

Effect of unary function on the stack.

Modulo remainder

The MOD function computes the modulo remainder y with respect to x (i.e., y mod x) omputed using the formula:

(y - x * floor(y/x))

The result replaces the y and x values on the stack

Efect on binary function on stack.

Fractional Part

The FRAC function removes the integer part of the x register, leaving only the fractional part. The result replaces the x value on the stack.

Effect of unary function on the stack.

Integer Part

The INT function removes the fractional part of the x register, leaving only the integer part. The result replaces the x value on the stack.

Effect of unary function on the stack.

Recipical (1/x)

The 1/x function computes the recipical of x. The result replaces the x value on the stack.

Effect of unary function on the stack.

If x is zero, an error "-e-" occurs.

Trigonometric Functions

Sine

The SIN function computes the sine of x. It is the inverse of the SIN−1 function. The value returned depends on the angle mode: degrees, radians or grads (DEG, RAD or GRD in the display where 360 degrees = 2π radians = 400 grads).

Set the angle mode using the Settings. The result replaces the x value on the stack.

Effect of unary function on the stack.

Cosine

The COS function computes the cosine of x. It is the inverse of the COS−1 function. The value returned depends on the angle mode: degrees, radians or grads (DEG, RAD or GRD in the display where 360 degrees = 2π radians = 400 grads).

Set the angle mode using the Settings. The result replaces the x value on the stack.

Effect of unary function on the stack.

Tangent

The TAN function computes the tangent of x. It is the inverse of the tan−1 function. The value returned depends on the angle mode: degrees, radians or grads (DEG, RAD or GRD in the display where 360 degrees = 2π radians = 400 grads).

Set the angle mode using the Settings. The result replaces the x value on the stack.

Effect of unary function on the stack.

Arcsine

The SIN−1 function computes the arcsine of x. It is the inverse of the SIN function. The value returned depends on the angle mode: degrees, radians or grads (DEG, RAD or GRD in the display where 360 degrees = 2π radians = 400 grads).

Set the angle mode using the Settings. The result replaces the x value on the stack.

Effect of unary function on the stack.

Arccosine

The COS−1 function computes the arccosine of x. It is the inverse of the COS function. The value returned depends on the angle mode: degrees, radians or grads (DEG, RAD or GRD in the display where 360 degrees = 2π radians = 400 grads).

Set the angle mode using the Settings. The result replaces the x value on the stack.

Effect of unary function on the stack.

Arctangent

The TAN−1 function computes the arctangent of x. It is the inverse of the TAN function. The value returned depends on the angle mode: degrees, radians or grads (DEG, RAD or GRD in the display where 360 degrees = 2π radians = 400 grads).

Set the angle mode using the Settings. The result replaces the x value on the stack.

Effect of unary function on the stack.

Radians to Degrees Conversion

The →DEG function converts x from radians to degrees. The result replaces the x value on the stack.

Effect of unary function on the stack.

Degrees to Radians Conversion

The →RAD function converts x from degrees to radians. The result replaces the x value on the stack.

Effect of unary function on the stack.

Value of pi

The π function pushes the value of pi (3.14159...) onto the stack.

Polar Conversions

Polar Conversions

MathU RPN provides two functions to convert back and forth between Cartesian (rectangular) coordinates and polar coordinates. The relationship between polar coordinates and Cartesian coordinates is defined by the following picture and formula

x = R cos(theta)
y = R sin(theta)
R = sqrt(x2 + y2)
theta = atan2(y,x)

The R→P function converts x and y from Cartesian coordinates to polar coordinates.

The P→P function converts R and θ from polar coodinates to Cartesian coordinates.

Number Base Functions

MathU RPN can display and compute with numbers in hexadecimal (base 16), octal (base 8), and binary (base 2) format as well as the default decimal (base 10) format. Non-decimal values are displayed with a subscript following them indicating the number base and subscripts that indicate the bit position. The number base functions honor the wordsize set in the preference screen. You can also choose to display the numbers with leading zeros via the preferences screen.

hexadecimal display
octal display
binary display

The tiny subscripts in the display indicate the bit position to aid in reading the number.

When one of the non-decimal bases is chosen, the keypad changes to reveal the number base functions and the A-F hex digits.

Number base functions revealed when in hex, oct or bin mode.

The functions HEX, OCT, BIN, and DEC convert values between bases and set the number base for further calculations and input.

Values outside the wordsize preference are truncated (that is, the excess most significant bits are dropped) and are converted to an integer. The display will automatically switch to a smaller font when large numbers are viewed in oct or bin format. Large binary numbers may wrap on the display as well.

Number Base Conversions

The function HEX converts x into hexadecimal (base 16). Non-integer values or values outside the current wordsize are truncated to the number of bits set in the wordsize preference. When entering hexadecimal numbers, use the digits 0-9 and A-F.

The function OCT converts x into octal (base 8). Non-integer values or values outside the current wordsize are truncated to the number of bits set in the wordsize preference. When entering octal numbers, use the digits 0-7.

The function BIN converts x into binary (base 2). Non-integer values or values outside the current wordsize are truncated to the number of bits set in the wordsize preference. When entering binary numbers, use the digits 0 and 1.

The function DEC converts x into decimal (base 10).

For all these functions, the results replace the value in the x register.

Effect of unary function on the stack.

Modular Arithmetic

A few functions behave differently when a non-decimal number base is chosen:

The other functions on the calculator can be applied to the non-decimal numbers. The result will be displayed as an integer even though the value may contain a fractional part. However, if the result has more than 48 bits, the number will be displayed in decimal. Simply reapply the conversion routine to wrap and truncate the value to the wordsize.

Bitwise Operations

Bitwise AND

he functions AND computes the bitwise AND of the values in the y and x registers.

Effect of binary function on the stack.

Bitwise OR

he functions OR computes the bitwise OR of the values in the y and x registers.

Effect of binary function on the stack.

Bitwise XOR

he functions AND computes the bitwise exclusive OR of the values in the y and x registers.

Effect of binary function on the stack.

Bitwise NOT

The function NOT computes the 1's complement (all bits inverted) of x. The result replaces the x value on the stack.

Effect of unary function on the stack.

In addition, when a non-decimal base is active, the function CHS can be used to compute the 2's complement of x.

Change sign

The function CHS changes the sign of the value in the x register. When a non-decimal base is active, CHS computs the 2's complement of x. The result replaces the x value on the stack.

Effect of unary function on the stack.

Number of bits

The function #BITS computes the number of bits in x. The result replaces the x value on the stack.

Effect of unary function on the stack.

Left justified bit mask

The function MASKL creates a left justified bit mask with x bits. The value is left justified within wordsize bits. The result replaces the x value on the stack.

Effect of unary function on the stack.

The function MASKR creates a right justified bit mask with x bits. The result replaces the x value on the stack.

Effect of unary function on the stack.

Arithmetic bit shift to the right

The function ASR arithmetically shifts y to the right by x bits. The leftmost bit is replicated during the shift.

Effect of binary function on the stack.

Logical bit shift to the right

The function SHR logically shifts y to the right by x bits. The bits are shifted circularly filling in from the left.

Effect of binary function on the stack.

Logical bit shift to the left

The function SHL logically shifts y to the left by x bits. The bits are shifted in circularly filling in from the right.

Effect of binary function on the stack.

Random Number

The RAND function pushes a uniformly distributed number onto the stack.

When the decimal (DEC) number base is active, the number will be a random real number between 0.0 and 1.0. When a non-decimal number base is active (HEX, OCT, or BIN), the number will be a random integer between 0 and the maximum integer implied by the current wordsize.

Statistics Functions

Entering Statistical Data

The statistical functions accumulate sums based on the values in the x and y stack registers. These sums are used to compute the mean and standard deviation σ. Use f CLΣ to reset all the statistical registers to zero before accumulating sums.

Enter the values into the x and y registers and then tap Σ+. If you notice a mistake keying in the x,y values after pressing Σ+, re-key the errant values and press g Σ− to remove them from the sums.

The statistical sums are accumulated and are stored in assigned storage registers as shown

Statistical register assignments

Accessing the statistical sums

You can view these values via RCL n where n is the number of the register containing the desired sum. The sequence RCL Σ+ can also be used to recall Σx and Σy into the x and y registers respectively.

Mean and standard deviation

The mean and standard deviation are computed as

with similar equations holding for the y component as well.

Mean

The function f  computes the mean of both x and y and places them into the x and y registers respectively

Effect of MEAN on the stack

Standard Deviation

The function f σ computes the standard deviation of both x and y and places them into the x and y registers respctively

Effect of STD on the stack

The value computed is the sample standard deviation which is appropriate when the x and y data does not represent the entire data set. If they do represent the entire data you should instead compute the population standard deviation by correcting the sample deviation by the factor

σpop = (√(n−1)/n)) * σsamp

where n is the number of data points (RCL 1).

Linear Regression

MathU RPN includes two functions to fit linear trend lines to a set of data, ŷ,r and x̂,r. The first uses the linear trend to estimate x given a value of y, the second uses the linear trend to estimate y given a value of x. Both functions rely on the statistics registers to hold information about the data points. The correlation coefficient and the estimate are pushed onto the stack.

The goodness of fit parameter is called the correlation coefficient r. r will be near 1.0 or -1.0 for data that is accurately described by the linear fit and values near zero for data that does not have a clear linear trend.

The figures below show two situations, one with a linear trend and another that is not very well estimated by a linear trend. The correlation coefficient for each situation is shown.

Linear regression example Linear regression example

To perform a linear regression:

  1. f CLΣ to clear the statistics registers.
  2. Enter the data points via y ENTER x Σ+
  3. Repeat step 2 for each point in the data set.
  4. To estimate a y value given an x, enter the x value followed by f ŷ,r
  5. To estimate an x value given a y value, enter the y value followed by g x̂,r
  6. The correlation coefficient can be accessed via x<>y

Determining the trend line parameters

You can use the ŷ,r function to determine the equation of the trend line, y = m*x + b:

  1. Enter the data points into the statistics registers as described above.
  2. 0 f ŷ,r to determine b by computing the estimated y when x is 0.0
  3. STO 0 to store b in register 0 (in order to remember it)
  4. 1 f ŷ,r to estimate value of y when x is 1.0
  5. RCL 0  to compute the slope m.

Factorial (gamma function)

The N! function computes the factorial of x. When x is a non-integer, this function returns gamm(x). The result replaces the x value on the stack.

Effect of unary function on the stack.

Index

All Functions (alphabetically)