MathU for iPhoneCreative Creek, LLC

Welcome to the

MathU™ 1.0 for iPhone

RPN Scientific Calculator

Documentation

IMPORTANT: If you do not see any images and are running Windows XP you need to extract the files from the .zip archive before viewing. Open the .zip file and select "Extract All Files".

Contents

What is MathU?

[Back to Top]

Thank you for evaluating MathU. MathU is a Reverse Polish Notation (RPN) scientific and financial calculator for the iPhone. It runs within the Safari Browser on the iPhone. The calculator supports double precision accuracy and has 80 functions including 5 financial functions, 4 number bases and 8 statistical functions. There are 20 memory registers (two banks of 10 each).

Technical specifications

What is new in Version 1.0?

[Back to Top]

MathU 1.0 for iPhone is the first release for the iPhone. It has similar features to MathU 3.0 for Palm OS.

System Requirements

[Back to Top]

MathU runs within the Safari web browser on the iPhone or iPod touch. It will work with iPhone OS version 1.1 or higher. Support for the home screen icon requires iPhone OS version 1.1.3 or higher.

Log into MathUInstallation

[Back to Top]

Since MathU is hosted on the web, you run it by going to http://www.creativecreek.com/app/mathu.php in the Safari browser. The first time you do this you will be presented with a login screen. Simply enter your registration code and you will automatically be taken to MathU. If you have not purchased a registration code yet, then tap the "free trial" link to get a temporary code e-mailed to you that lasts for 15 days.

Do this directly from the iPhone and you can start using MathU right away.

Get trialFree Trial

[Back to Top]

MathU features a free 15 day trial. All the features of MathU are available during the trial. The only difference between the trial and a registered version is that a notice displays on startup. After the 15 day trial, the five key (5) becomes disabled. If you decide that you like MathU, purchase a registration code to unlock it.

Registration

[Back to Top]

A registration code can be obtained by purchasing MathU from [IPMATHU_BUYIT].

A registration code will be e-mailed to you. To register your software, tap the "Enter registration code link" in the notice or click on the link provided in the e-mail.

If for any reason you have trouble registering your software please contact us via contact page.

Landscape keypadTwo Keypads

[Back to Top]

MathU for iPhone supports both a portrait and landscape keypad

Simply rotate the iphone to switch between landscape and portrait keypads.

Add icon to home screenAdd icon to home screen

[Back to Top]

To add a MathU icon to the home screen, tap the + button as shown in the picture while running MathU (Requires iPhone OS 1.1.3 or higher).

Basic Operations

[Back to Top]

MathU is based on Reverse Polish Notation (RPN). RPN differs from standard mathematical notation in that the numbers to be operated on are pushed onto a stack and then executed upon by a function. MathU has a 16 element stack. 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 is just like the way you were probably taught to add numbers.  First you wrote the two numbers above each other like this:

5
7
--

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 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 +

The ENTER key is used to separate the two values. Most buttons on MathU can access three functions. The function or number on the top of each button is accessed without shifts. The function just above the button 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 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 LASTX button.

settings panelPreferences

[Back to Top]

The preference screen is displayed when you execute the PREFS function or when you tap the degree indicator on the screen.

Tap each setting line to go to screen that displays the choices. Tap the desired new setting to select it and return to the settings screen.

Basic Functions

[Back to Top]

7 8 9
4 5 6
1 2 3
0 .
Numerals  

A B C

D E F

Hexadecimal Hexadecimal digits. Active only when in HEX mode.
CHS Change sign of mantissa or exponent.  
EEX Start entering exponent  
undo Undo last character (or clear x register)  
Minus.
+ Plus
Χ Times
÷ Divide
ENTER Separate values and prepare x register to be overwritten

Stack and Register Functions

[Back to Top]

MathU has 20 registers -- 10 primary registers and 10 secondary registers. The secondary registers are used to store values for the financial and statistical functions. The secondary registers can be used to store your own values but you must be careful not to use any financial or statistical functions if you do so.

The 10 primary registers are accessed by pressing STO or RCL and then the register number 0 through 9. To access the secondary registers (registers 10 through 19) press STO . and then the register number 0 through 9. Another way to access the secondary registers is to swap the primary and secondary registers with P<>S and then use STO or RCL (without the .).

Key Function Description Stack effect
STO n sto Store into register n. Specify . n to access the secondary register (register 10+n)  
STO fn sto Store into financial register. fn can be N, i,PMT,PV, or FV.
STO + n sto Add contents of x register to register n  
STO n sto Subtract contents of x register from register n  
STO Χ n sto Multiply register n with contents of x register  
STO ÷ n sto Divide register n by contents of x register  
RCL n rcl Recall from register n. Specify . n to access the secondary register (register 10+n)
RCL fn rcl Recall financial register. fn can be N, i,PMT,PV, or FV.
RCL Σ+ rcl Recall statistics sums.
P<>S p<>s Swap primary and secondary banks of registers  
CLREG clreg Clear all registers  
x<>y x<>y Exchange x and y registers
LST Χ lastx Recall last x value
CLX clx Clear x register  
CLSTK clstk Clear stack
R↑/td> rollup Rotate stack contents up
R↓ rolldown Rotate stack contents down
ENTER enter Push current value onto stack.
undo undo When entering a number undo the last character, otherwise clear the x register the same as clx.  

Scientific Functions

[Back to Top]

The unary functions operate on the value in the x register and replace it with the function result (f(x))

while the binary functions use the values in both the x and y registers and place the result in the x register.

Key Function Description Type
f   f shift. Use to access functions above each button.  
g   g shift. Use to access the functions at bottom of each button.  
MOD mod Modulo (y - x * floor(y/x)) binary
π pi Value of pi unary
LN ln Natural logarithm (base e) unary
LOG log Base 10 logarithm unary
ex exp Exponential function unary
10x pow10 Ten to the x power unary
yx ytox y to the power of x binary
x2 sq Square unary
√x sqrt Square root unary
1/x inv Reciprocal unary
FRAC frac Fractional part unary
INT int Integer part unary
N! fact Factorial unary
% % Percent (y * x) / 100 binary
%CH % ch Percent change 100 * (x - y) / y binary
 

The INT and FRAC functions round to 9 decimal digits before determining the integer and fractional parts. Under this definition FRAC is computed using the formula

frac(x) = x - int(x)

Most of the time this produces the desired results but does treat the input as if it only had 10 digits of accuracy. One of the ramifications of this is that the fractional part doesn't always have the same sign as x. Take for example the number 1.99999999964 (i.e. 2 - 36e-11). When displayed in MathU this number looks like it is 2.0. Because of the rounding int(x) is 2 (as expected) while frac(x) is -36e-10.

Trigonometric Functions

[Back to Top]

The trigonometric functions are sensitive to the angle mode: degrees, radians, or grads (deg, rad, or grd in the display where 360 degrees = 2 pi radians = 400 grads).

Set the angle mode using the Settings screen. These functions operate on the value in the x register and replace it with the function result (f(x)).

Key Function Description Type
SIN sin Sine unary
COS cos Cosine unary
TAN tan Tangent unary
COS−1 acos Arccosine unary
SIN−1 asin Arcsine unary
TAN−1 atan Arctangent unary
π pi Pushes the value of pi (3.14159...) onto the stack.
 
→DEG deg Radians to degrees conversion unary
→RAD rad Degrees to radians conversion unary

Time Functions

MathU has two time functions

Polar Coordinates

MathU 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)
Key Function Description Effect on stack
R→P R->P Convert from Cartesian coordinates to polar coordinates
P→R P->R Convert from polar coordinates to Cartesian coordinates

Number Base Functions

[Back to Top]

MathU 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. The number base functions honor the wordsize set in the preference screen.

hexadecimal display
octal display
binary display

The functions hex, oct, bin, and dec convert values between bases and set the number base for further calculations and input.

Key Function Description
HEX hex Convert x register to hexadecimal number base.
OCT oct Convert x register to octal number base.
BIN bin Convert x register to binary number base.
DEC dec Convert x register to decimal number base.
AND and Bitwise AND of x and y
OR or Bitwise OR of x and y
XOR xor Bitwise exclusive OR of x and y

Values outside the wordsize preference are wrapped (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.

Modular Functions

[Back to Top]

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

Key Function Description
CHS   Two's complement. Replace x register with its two's complement (all bits inverted and 1 added)
+
+
Modular addition. Same as regular addition except that results that exceed the wordsize are wrapped.
-
Modular subtraction. Same as regular subtraction except that negative results are returned as two's complement numbers.
Χ
*
Modular multiplication. Same as regular multiplication except that results that exceed the wordsize are wrapped.
÷
/
Modular division. Same as regular division except that results that exceed the wordsize are wrapped and any fractional remainder is discarded.

The other functions on the calculator can be applied to non-decimal numbers. However, if the result is not an integer that is in range, an error is displayed and the number base reverts to decimal. The value in the x register will be the result of the computation. Simply reapply the conversion routine to wrap and truncate the value to be in range.

Financial Functions

[Back to Top]

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 ). When the annuity mode is annuity due (payments due at the beginning of the period ) then PMT in this equation is modified to be PMT * (1 + i).

The financial functions have two modes: input mode and calculation mode. MathU 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 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:

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

Key Function Description Details
N N Number of periods Input mode: Store displayed value as N.

Calculation mode: Compute N.

12x   Number of periods (annual basis) Input mode: Store 12 times displayed value as N.

Calculation mode: Compute N / 12.

This function is provided as a convenience when there are twelve periods per year.

i interest Interest rate per period Input mode: Store displayed value as i (in percent).

Calculation mode: Solve for i. If the solver doesn't converge an error '-e-' will be displayed.

12÷   Interest rate (annual basis) Input mode: Store displayed value divided by 12 as i (in percent).

Calculation mode: Solve for i * 12. If the solver doesn't converge an error '-e-' will be displayed.

This function is provided as a convenience when there are twelve periods per year.

PMT pmt Payment per period Input mode: Store displayed value as PMT.

Calculation mode: Compute PMT.

PV pv Present value Input mode: Store displayed value as PV.

Calculation mode: Compute PV.

FV fv Future value (or balloon) Input mode: Store displayed value as FV.

Calculation mode: Compute FV.

CLFIN clfin Clear financial registers and set payment period to the end (ordinary annuity).  

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 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.

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, 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 (see example 4 below).

Examples

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 key strokes to solve this problem using MathU are

  1. CLFIN to reset the financial registers (since the values in the registers are maintained between sessions with MathU it is a good idea to reset the financial registers before each use of the financial functions).
  2. 5 ENTER 1 2 Χ N to set the number of periods (in months)
  3. 7 . 2 5 ENTER 1 2 ÷ i since the interest per month is 7.25/12 %
  4. 1 8 5 0 0 PV to set the principal or present value of the loan
  5. PMT to compute the payment per period (ans: $-368.51). The value is negative because the payments are made in the opposite cash flow direction from the principle cash flow.

Note: The convenience functions 12x and 12÷ could have been used in steps 2 and 3 to replace the keystrokes 1 2 Χ N and 1 2 ÷ 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?

  1. 2 0 0 0 CHS FV Set the value $-2,000 as the FV (balloon) for the loan. The value is negative because this is money you will pay out.
  2. PMT to compute the new payment per period (ans: $-340.75)

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

  1. N PMT Χ FV FV + PV PV + to compute the total payments minus the loan value
    (ans: $-3,945.17). Note that FV and PV had to be pressed twice since the first time stored the total payments into FV or PV.

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 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.

  1. CLFIN to reset the financial registers
  2. 2 0 0 1 ENTER 1 9 8 5 N to set the number of periods (in years)
  3. 1 0 0 0 0 CHS PV to set the starting value of the account. The value is negative since you added this value to the account with the rollover.
  4. 2 0 0 0 CHS PMT to set the annual contribution.
  5. 8 0 0 0 0 FV to set the current value of the account. The value is positive since this is the money you would receive if you sold all the assets in the account.
  6. i to compute the effective annual rate of return in the account (ans: 6.39%)

Statistical Functions

[Back to Top]

The statistical functions accumulate sums based on the values in the x and y stack registers. These sums are used to compute the mean mean and standard deviation σ or can be accessed directly via P<>S and RCL. Use CL Σ to reset all the statistical registers to zero before accumulating sums. If you make a mistake keying in the x,y values and after pressing Σ+, re-key the errant values and press Σ− to remove them from the sums. The mean and standard deviation are computed as

with similar equations holding for the y component as well.

Key Function Description Effect on stack
Σ+ stats+ Accumulate x,y

n is the number of sums accumulated so far.

Σ− stats- Remove x,y

n is the number of sums accumulated so far.

RCL Σ+ rcl Recall statistics sums.
mean mean Mean
σ std Standard deviation
CL Σ clstats Clear statistical registers  
N! fact Factorial
RAND rand Random number from 0 to 1.0 (uniformly distributed)
% % Percent
%CH % ch Percent change

Legal Stuff

[Back to Top]

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 is copyrighted. Copyright laws apply and the software shall be classified as proprietary material. If you want to tell your friends about MathU just share this link with them: http://www.creativecreek.com/app/mathu.php

When you purchase MathU 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 and Creative Creek are trademarks of Creative Creek, LLC. iPhone and iPod are trademark of Apple, Inc. or its subsidiaries.

Contacting Creative Creek, LLC

[Back to Top]

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

 

Copyright © 1998-2008 by Creative Creek, LLC and Clay M. Thompson -- All rights reserved.

Last updated: 22-Apr-2008