# Scientific Calculator Precision 72

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

Scientific Calculator Precision 72 for Windows 98, Windows ME, Windows 2000, Windows Server 2003, Windows XP and Vista

## Quick Start

Type 1+2 into Edit Formula window and left-click on button Calculate. In the Result window +3 appears. Right-click on the 1+2 in the Edit Formula windows and choose Select All. Right-click again and choose Cut. Type, using either keyboard or clicking on buttons, 59!. That is fifty nine factorial. Click Calculate. The result is +138683118545689835737939019720389406345902876772687432540821294940160000000000000 . From Grouping combo-box choose 10-digits and click Calculate again. The result becomes +1,3868311854,5689835737,9390197203,8940634590,2876772687,4325408212,9494016000,0000000000 . Groups of ten digits are separated by comma. Now we see that the result has 81 digits. This is an exact number. Now try 60!. The result is +8.3209871127,4139014427,6341183223,3643807541,7260636124,5952449277,6964096000,0E81. The mantissa has only 72 digits but the exponent E81 shows that the exact result has 81 digits after the first digit (before decimal point) digits. It might be zeroes, might be nonzero digits. So, we don’t know the last ten digits. Thus we calculated the result with precision (accuracy) 72 digits. The precision 72 is guaranteed for all arithmetic operations. Although sometimes we get greater accuracy.

This calculator follows classical approach when uncertainty of f(x) calculation is estimated by formula max|(derivative(f))|*|x*uncertainty(x)|, where maximum of function derivative is considered on interval [x-uncertainty(x),|x+uncertainty(x)], and uncertainty(x)=|x|*10^(-precision). Thus sin(2π)=0+-1E-72 and sin(2*1E20*π)=0+-1E-50. As we see, the resul’s accuracy degrades with grows of argument, but such approach allows to preserve all trigonometry facts like sin(even number*π+x)=sin(x). Calculators with multi-precision allows to calculate sine of big argument, like 1E40, with any precision, but cannot calculate sin(1E40*π) since they don’t have π. The π becomes for them a “floating” number with arbitrary precision. It seems strange, because 2π corresponds to one rotation and counting 1E40 rotations is much easier then measuring 1E40 radians.

Let’s continue. You can type into Edit Formula window a mathematical expression of any length and complexity. For example, type (1+sin(2+cos(3))+tan(4))/(ln(5)-tan(6)+atan(7)). Typing of such expression takes time. If you want to repeat such formula (after other calculations), go to Tab History. In the History rich-text-box find the formula and select it (pressing left button on mouse and dragging mouse). Right-click mouse and choose from context-menu Copy. Return to Tab Formula. Right-click into Edit windows and from context-menu choose Paste. All text-boxes in the calculator have similar right-click menus.

Open tab Variables. There are ten variables available. Type into text-boxes any numbers you want to use often in your formulas. Press Parse. Return into tab Formula and type formulas with variables. For example x0+cos(x1)+sin(x2)+tan(x3).

Open the tab Common Constants. There is the list of constants common in science. This list is prebuilt but you can change it and save as a text file. At any moment you can open your list and use it. The list User Constants has similar purpose. Rules for User Constants are weaker. You can copy a part of Common Constants into User Constants. A long list of Common Constants can slow down calculations. If you need only a small part of Common Constants then copy them into User Constants and enable them.

More help is available online. Click on the Product Support page link above.

## Formula editing

The easiest way to edit formula is left-clicking buttons. It allows to keep brackets balanced, functions names correct and so on. Clicking the button "calculate" triggers calculation of entered formula. The result of calculation appears in the window (text-box) named Result.

The second way is to use keyboard (and keypad). All controls usual for editing are available. Pressing the key Enter triggers calculation. Before using keyboard don't forget to click inside text-box to get focus (blinking cursor).

After calculation the entered formula is not deleted from the Edit window allowing to modify formula. If you want to delete formula select it by mouse and delete. For selecting text you can use right-click menu "Select All" or left-click mouse dragging along the text. For deleting selected text use right-click menu "Cut" or "Delete".

Using right-click menu you can copy and paste text between Edit window and all other text-box windows.

For copying text from saved History file open saved History file (usually in WordPad, Notepad, or MS Word ), drag mouse along the text for selection and then choose Copy from right-click menu. Then go to Formula tab, right-click onto Edit window, select command Paste.

Apply the same procedure for copying text from History window or saved History file into variables windows in Variables tab.

Functions and operations have to be entered exactly as they appears by pressing buttons. Alternative names are not supported.

Numbers can be entered in wide variety of formats. But for exponent always use E, since "e" is reserved for "number e". Long numbers will be rounded to 72 digits. For example, 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 will become +1.23456789012345678901234567890123456789012345678901234567890123E99. In default Mixed mode (until Scientific mode check-box is checked) integer numbers appears "as is" up to 72 digits. If Scientific check-box is checked then all numbers in variable-boxes and result-box are given in scientific format 1.23456789012345678901234567890123456789012345678901234567890123En, where n has maximum 9 digits, from E-999999999 to E999999999. Numbers with greater exponents will be given status  Infinity. Exponents E+9...9 and E9...9 are the same.

## Number system

In general, Scientific Calculator Precision 72 works with real numbers. However, some real numbers, which are infinite sequences of digits, are replaced by finite sequences. Thus the calculator does not distinguish number π, which is infinite sequence of digits, and finite sequence +3.14159265358979323846264338327950288419716939937510582097494459E0 .

The greatest exponent available is E999999999 (nine nines). Numbers with greater exponents are given status Infinity (what is a big simplification, of course). Numbers with negative exponent less than E-999999999 are given status Zero. Number Infinity is extended number with special properties. Number Zero is a usual real number and a special numbers as well. Other special numbers are Uncertainty and NaN. We get Uncertainty dividing Zero by Zero, for example. We get NaN by taking square root of -1, for example. Direct entry of special numbers into edit text-box is not allowed, but you can experiment with special numbers, using 1/0, 0/0, (-1)^0.5, log(-1), and so on.

Arithmetic of special numbers:

f(NaN)=NaN, NaN+any=NaN, NaN-any=NaN, NaN*any=NaN, NaN/any=NaN, any/NaN=NaN;

0/0=Uncertainty, Infinity/Infinity=Uncertainty, Infinity+Infinity=Uncertainty, Infinity-Infinity=Uncertainty, 0*Infinity=Uncertainty, f(Uncertainty)=Uncertainty, Uncertainty+any=Uncertainty, Uncertainty-any=Uncertainty,  Uncertainty*any=Uncertainty,  Uncertainty/any=Uncertainty,  any/Uncertainty=Uncertainty.

1/0=Infinity, 1/Infinity=0, Infinity*0=Uncertainty, Infinity*Infinity=Unfinity, periodic function f(Infinity)=Uncertainty,2^Infinity=Infinity, 1^Infinity=1, (-1)^Infinity=NaN, log(Infinity)=Infinity, log(0)=Infinty.

{Infinity)!=Uncertainty, because (x)! has different behavior for positive and negative x.

2^Infinity=Uncertainty, because 2^x has different behavior for positive and negative x.

## Common constants

The list of common constants is prebuilt and open at the start of application. But user is free to change the content of list and save changed list into text file, which can be open at any moment. The records of the list must have following format: [name][any combination of spaces and equal signs][number][space][any comment]. For example, commonConstant = 1.234567E+9 this is a comment. The name can consist of any characters except space and comma. However, special symbols (+,-,*,/ etc.) are nor recommended, because they degrade readability of formula.

## User constants

The filling user constants list is responsibility of user. The built list should be saved into text file for opening and using it at any moment. The rules for user constants are the same as for common constants. But remember that names from common constants list are applied first. If a name from common constants is a part of some name in user constant then the part will be replaced by value what will create a mess in formula. Because oh that you should follow rule that common constant name should be longer then user constant name. Also avoid to use reserved names x0, x1, ..., x9, and symbols +-*/ . On other hand, names like _x0_ ,  _cos(x1)_, _+_ etc. (if you really need it) will not create any difficulty. Commas can be used in numbers at user will. For example, 1,234,567,890.12,34,56,78,90E99,99 .

## Gamma function

Gamma function is calculated by Spouge algorithm. The algorithm is relatively long and involves many divisions what makes precision relatively low. In order to estimate the precision of calculation use property Gamma(z)=(z-1)! when z is positive integer. For example, Gamma(1)=+1.0000000000,0000000000,0000000000,0000000000,0000000000,0000000000,0000171767,5E0 has precision 65 digits and Gamma(2)=+1.0000000000,0000000000,0000000000,0000000000,0000000000,0000000000,0003026149,4E0 has precision 64 digits. Thus we conclude that Gamma(2.4)=+1.2421693445,0430540491,3070252268,3004924315,1724099202,2966055507,5424822493,0E0 has precision between 64 and 65 digits. Regretfully, we do not have such nice estimation for negative z. Gamma function, as a complex function, has poles at negative integers and complex functions usually demonstrate wild behavior at poles. See also article Exploring Gamma Function .

## Lower Incomplete Gamma function

Lower Incomplete Gamma function is calculated by expansion LIGamma(a,x) = Σ( ((-1)^k/k!) * (z^(a+k)/(a+k)) ) = Σ(0; infinity;  (-1)^k*x^(a+k) / (k!*(a+k)) ) . The algorithm is strait forward and allows to reach high accuracy. Unfortunately,  each iteration involves division by (a+k), which itself is a long operation. This makes LIGamma calculation relatively slow.

## Upper Incomplete Gamma function

Upper Incomplete Gamma function is calculated by formula UIGamma(a,x) = Gamma(a) - LIGamma(a,x) . Precision of calculation is the same as for Gamma .

## Permutations, Combinations, Newton Binomial Coefficients, and Gauss Binomial Coefficients

Permutations are calculated according to formula P(n;k) = n! / (n - k)! . Note that despite this equality the calculation of P(n;k) is done much faster than calculation of n! / (n - k)! . This is because permutation has a known calculation algorithm, which is built into the program. Whereas the formula n! / (n - k)! calls the factorial procedure two times. Moreover n! grows fast with increase of n and can quickly cause overflow (overflow is a process of losing precision of calculations). Internal algorithm of P(n;k) does not create overflow. The same consideration applies to C(n;k), N(x;k), and G(x;k;q) .

Combinations are calculated according formula C(n;k)  =  n! / ( k! * (n -k)! ) . They are called also binomial coefficients, because they represents coefficients in polynomial (binomial).

The Newton polynomial  is given by formula N(x;k) = x(x-1)(x-2)...(x-k+1)/k! . If x is given a real value, it becomes a generalized binomial coefficient. If x is a natural number n, it becomes  C(n;k) .

G(x;k;q) are generalized Gaussian binomials called also Gaussian coefficients and q-binomial coefficients . The calculation formula is G(x;k;q) = (1-q^x)(1-q^(x-1))...(1-q^(x-k+1))/(1-q)(1-q^2)...(1-q^k) .

## Σ and Π

Σ has syntax Σ(index start; index end; expression). Index start and end are in general any integer numbers. They may also be any  formulas not involving variable k. Then the formulas are evaluated and floor of the result is taken. For example Σ(35/10; 40.4; x0^k/k!) is the same as Σ(3; 40; x0^k/k!) . The expression in Σ(index start; index end; expression) is any formula in general involving variable k, but not involving other Σ or Π . For example Σ(0; 20; P(20; 20-k)*x0^k/k!) . So Σ and Π do not allow nesting.

When the difference between index start and index end is big and the expression is long then the calculation can be long. If you want to abort calculation, click button Abort on the Menu bar.