Simple Calculator

Mathematical Software. Mathematical Research. Mathematical Education. Tvalx Products.

 

Introduction

Simple calculator is a general purpose calculator which combines simplicity in use and power of calculation. It handles simple arithmetic operations and complex formulas.

The Simple Calculator has three windows or boxes: Edit Window, Result Window, and History Window. In the Edit Window, you enter formulas using buttons and a keyboard. When you use a keyboard, you can use all standard rules of text editing. The most convenient is the use of a numerical pad on the right of a standard keyboard. Buttons also provide full functionality of a Simple Calculator. If you make a mistake while typing a formula, such as square root of a negative number, you just get a message in the Result Window that the formula is unclear. The Simple Calculator tries to handle all possible ambiguities, following standard mathematical rules. For example, formula 3/-4 - 5^2 will be treated as 3/(-4) - (5^2)  .

A result number in the Result Window can be copied into Edit Window by clicking Result button. Sometimes it is useful during calculations. For example factorial button is absent, but you can easily calculate 10! by typing formula 1*2*3*4*5*6*7*8*9*10 or by series 2*3, =, Result, *4, =, Result, *5, =, Result, *6, =, Result, *7, =, Result,*8, =, Result, *9, =, Result, *10, =, imitating "old style calculators".

 

 

Controls

 

Arithmetic Operations

There are four standard arithmetic operations buttons : + - * /  . Clicking button "=" triggers calculation. If you are typing into Edit Window from a keyboard, then use Enter key for triggering calculation.

 

Square Root, Power and Logarithm

There are three advanced functions: square root, power, and decimal logarithm. If you are typing into Edit Window directly from a keyboard, then use (a)^(1/2) for square root of a.

 

Plus and Minus

Pluses and minuses are treated in the standard way, depending on a situation. For example, in expression -1+2 first minus is treated as unary operation, affecting 1, and plus is treated as binary operation affecting -1 and 2. Multiple pluses and minuses are treated by rules of multiplication. For example --2=(-1)*(-1)*2=2, and +---2=(+1)*(-1)*(-1)*(-1)*2=-2

 

Order of operations and Parentheses

Standard rules are applied for order of operations. Square root, power, and logarithm have highest priority. Then follow multiplication and division. Then addition and subtraction. Use parentheses  everywhere you are not certain about order of operations. For example, -2^4 = - (2^4) = - 16 and (-2)^4 = 16 .

 

© 2008 Tvalx