If you don't have Java installed on your computer, you can download it for free from http://www.java.com. It is a reasonably big download, but a simple installation. After reading this documentation, you can shrink the window so that only the calculator is visible. ## CoCalc RPN Scientific CalculatorCopyright 1996-2004 CoHort Software (www.cohort.com). Version 1.05. Released 2003-03-11.## Table of Contents:## What is CoCalc?CoCalc is an RPN scientific calculator from CoHort Software. In addition to the standard features for scientists, CoCalc includes several features for computer programmers (Hex and Binary notation, and some integer and boolean math functions). CoCalc has greater precision and greater range than most calculators. Also, this calculator will never be lost under a pile of papers on your desk; it won't ever need new batteries; and the buttons will never break.## What is CoCalc2?CoCalc2 is a version of CoCalc with text that is much larger. Otherwise, it is identical.## CoCalc Is FreeYes. CoCalc is freeware. You are welcome to obtain a copy of the program and use it for free. (However, we retain the copyright and ownership of CoCalc and you are forbidden from reselling or altering CoCalc.) CoCalc was created by CoHort Software, which makes graphics and statistics software for scientists and engineers. Since CoCalc is a small program, we are just giving it away. Please contact CoHort Software if you have any questions, suggestions, or comments about CoCalc.
For regular CoCalc: - Download (right click or Apple click) http://www.cohort.com/CoCalc.html and choose to save the file somewhere on your hard drive.
- Download (right click or Apple click) http://www.cohort.com/CoCalc.class and choose to save the file in the same directory as CoCalc.html.
- Use your browser to view your copy of the calculator (
`CoCalc.html`) even when you aren't connected to the internet. Consider adding a bookmark to your copy of CoCalc.html.
For CoCalc2 (the large text version): - Download (right click) http://www.cohort.com/CoCalc2.html and choose to save the file somewhere on your hard drive.
- Download (right click) http://www.cohort.com/CoCalc2.class and choose to save the file in the same directory as CoCalc2.html.
- Use your browser to view your copy of the calculator (
`CoCalc2.html`) even when you aren't connected to the internet. Consider adding a bookmark to your copy of CoCalc2.html.
- Credit CoHort Software and include a link to the
CoHort Software home page.
For example, you might include a paragraph like:
Here is a free RPN scientific calculator available as a Java applet. CoCalc is free for personal use (but please do not alter or resell it). Try CoCalc now. Or, download these files ( http://www.cohort.com/CoCalc.html and http://www.cohort.com/CoCalc.class ) and use your browser to view your copy of the calculator ( Please change the http references to the CoCalc files on your server.`CoCalc.html`) even when you aren't connected to the internet.There is also a large text version of CoCalc, called CoCalc2. Try CoCalc2 now. Or, download these files ( http://www.cohort.com/CoCalc2.html and http://www.cohort.com/CoCalc2.class ) and use your browser to view your copy of the calculator ( `CoCalc2.html`) even when you aren't connected to the internet. - Distribute the files for free and without making any changes to them.
- Send us an email message with your web site address (so we can see the reference) and your email address (so we can notify you of updates). We won't use this information for any other purpose.
Return to the calculator. ## Other Software:CoHort Software develops graphics and statistics software for scientists and engineers. CoCalc is currently our only freeware program. Our other programs are:- CoPlot - for making publication-quality 2D and 3D graphs, maps, and technical drawings.
- CoStat - for statistical analysis.
web site: www.cohort.com email: CoHortSoftware at gmail.com Our web site will always have the latest version of CoCalc. Return to the calculator. ## Source CodeCoCalc was written in Java. The source code is currently not available (sorry).Return to the calculator. ## SupportWe welcome your comments and suggestions for improvements. If you find a bug please let us know. If you can't figure out how some feature works, please read the documentation below. If you still can't figure it out, contact us. The preferred method of communication is email (especially for people outside of North America), but phone, fax, and mail are okay (see the numbers and addresses above).
Return to the calculator. ## History1.00 released 7/23/961.01 released 11/18/96 - Fixed y^x (which acted like x^y). 1.02 released 8/27/97 - Added support for keystrokes (which may not work with Java 1.1 and higher). Fixed the button-down line draw error (which may occur with Java 1.1 and higher). 1.03 released 2000-1-21 - Added CoCalc2 (a large text version). 1.04 released 2000-9-19 - small documentation changes. 1.05 released 2003-3-11 - added support for '*', and ',' keys (aliases for 'x' and '.'). We couldn't add access to the clipboard because, for security reasons, applets can't get access to the clipboard. Return to the calculator. ## Introduction to Using CoCalcCoCalc is a Reverse-Polish-Notation (RPN) scientific calculator. RPN calculators were popularized by Hewlett-Packard's great calculators. (If you buy a real calculator, get one from HP: they are well-designed, well-built, and reasonably priced. You can even visit the un-official HP calculator museum.)On ordinary, non-RPN
calculators, you do calculations by pressing buttons in the order that
you would write an equation on paper (e.g., If you aren't used to it, RPN seems odd at first. But when you get used to it and use it for non-trivial calculations, you will see that it is a wonderful system. Return to the calculator. ## Entering NumbersFor simple numbers, just press the appropriate buttons. For example, to enter 45.68, press:4 5 . 6 8.
To enter a number with an exponent: after entering the mantissa of the
number, press To make a number negative, type the number and then press To make an exponent negative, press For many of the buttons, you can also type the similarly named keys.
This works for the following keys:
Return to the calculator. ## The StackThe stack consists of 4 registers (slots which hold numbers), which are named: x, y, z, and t. When you enter a number, it is constructed in the x register.When you
have finished entering a number, you can do something to the number
(e.g., press a button that does something to the value in the x register,
like Many buttons are commands that use the values in the x and y registers,
e.g., There are 3 important keys for manipulating the numbers in the stack: `Enter`- this button pushes all of the values upwards. The x value stays in x and is also pushed into y; y goes into z; z goes into t; and t goes into oblivion. For example,`press 1 Enter 2 Enter Enter`.`rollDn`- this rolls down all of the registers. The t value moves to z; z moves to y; y moves to x; x moves to t. For example, press`3 Enter 4 rollDn rollDn rollDn rollDn`.`x<->y`- this button swaps the values in the x and y registers. For example, press`5 Enter 6 x<->y`.
Automatic stack lift: After you use a command (e.g., Return to the calculator. ## OperationsThe basic approach to using CoCalc is: enter numbers into the registers (for example,press 2 Enter 3) and do things to them
(press +).
This is clearly not the same as entering an equation, but with a little
practice it will become easier. Sometimes, you will see that there are
two general approaches: 1) enter the numbers in the order they occur
in the equation, using operators when the proper values are in the
proper registers, and 2) start with the part of the equation that is
within parentheses. These techniques are illustrated below.
Here are some simple equations and the buttons you need to press to do the calculation in CoCalc: Problem: Problem: Problem: Problem: Problem: For more complicated equations or if you repeatedly use a constant,
you may want to store values in a storage register.
Return to the calculator. ## Degrees vs. RadiansThere are two units commonly used to measure angles: degrees and radians. A complete circle spans 360 degrees. A complete circle spans 2*pi radians. Sometimes it is easier to work in degrees; sometimes in radians. CoCalc can work with either.The The Return to the calculator. ## Display OptionsNumbers can be displayed in different ways. TheFix, Sci,
and Eng options
all display numbers in base 10, but with slightly different ways of
determining how many digits will be shown and how the exponent
will be shown. The Hex and Bin options display
rounded values in base
16 and base 2 respectively.
For all of these options, the numbers stored in the registers are not changed; the numbers are just displayed in different ways.
Return to the calculator. ## Storage RegistersThere are 16 registers (slots) into which you can store, and later retrieve, numbers.To store the current x value, press To recall a stored number and put it in x (as if you typed it in), press
You can set all of the storage registers to 0 by pressing Registers 0 - 5 are used by the statistics procedures to hold
various sums. So, before using the statistics procedures,
use Return to the calculator. ## StatisticsCoCalc can do calculate simple correlation and linear regression statistics. To do so:- Initialize the statistics system by pressing
`clrReg`. Storage registers 0 - 5 are used by the statistics procedures to hold various sums. So, while using the statistics procedures, don't store anything new in registers 0 - 5. - For each x,y pair of numbers, type the y value, press
`Enter`, type the x value, and press`Sig+`. When you press`Sig+`, the program increments the storage registers (`s0=s0+1, s1=s1+x, s2=s2+x^2, s3=s3+y, s4=s4+y^2, s5=s5+xy,`) and displays the s0 value in x. These values will be used to calculate various statistics. - When you are done entering the data, press any of the statistics keys:
`mean`- Sets`x=the mean of the x values, y=the mean of the y values, z=z, t=t.``S.D.`- Sets`x=the standard deviation of the x values, y=the standard deviation of the y values, z=z t=t.``L.R.`- Linear Regression:`x=intercept, y=slope, z=z, t=t`.`x^,r`- Given a y value in the x register, this sets`x=expected x, y=correlation coefficient (r), z=z, t=t.``y^,r`- Given an x value in the x register, this sets`x=expected y, y=correlation coefficient (r), z=z, t=t.`
Sig-.
All of the discussion above presumes you have x,y pairs. However,
most of the statistics procedures ( Return to the calculator. ## Precision and Errors**Precision:**All registers (x,y,z,t and storage) are 64 bit doubles that have roughly 17-18 significant decimal digits and a range of +/-1e300. The +/-1e300 limit is slightly smaller than the true range of doubles; CoCalc restricts it to help avoid numeric errors.**Integer precision:**Calculations that are done on rounded values (e.g.,`div, mod, <<, >>, and, or, xor, not`) are done on 64 bit integers (called "long's"). Unfortunately, since the precision of doubles is slightly less than the precision of long's, the full range of long's is not available. This should only be a problem in truly extreme cases (e.g., numbers greater than 1e17).**Errors:**CoCalc tries to catch and prevent numeric overflows, division by 0, sqrt, log or ln of a negative number, and other errors. Any calculation that leads to a value greater than +/-1e300 (and some that lead to +/-1e295) lead to an error message. Any calculation done with a error value leads to an error (e.g.,`1+error=error`).**Clearing Errors:**You can clear an error value in the x register by pressing`clx`**Round-off errors:**Computers are not good at exactly storing decimal values. After a series of calculations this often leads to the situation where the internal value of a number is not exactly what you expect (e.g., what appears as`100.0000`may be`99.9999999999`internally). Usually, this doesn't matter, because the numbers are rounded when they are displayed (e.g.,`Fix 4`will show you`100.0000`). But if you subsequently use`int`the result will be`99`and the result of`frac`will appear as`1`(although it is 0.9999999999 internally)! There isn't much you can do about this; just be aware of it.
Return to the calculator. ## Alphabetic List of Buttons:- .
- While you are typing in a number, this appends '.' to the number.
- %
- Set
`x=x*y/100, y=y, z=z, t=t`. Note that the y, z, and t registers are unchanged. For example, to calculate 15% of $30, press`30 Enter 15 %`. - ->Deg
- Change x from Radians to Degrees:
Sets
`x= x / 2pi * 360`. This assumes that the original x value is an angle in Radians or Degrees, depending on the current Rad or Deg setting. See Degrees vs. Radians. - ->Pol
- Converts from rectangular coordinates(x,y)
to Polar coordinates (x=radius, y=theta):
Set
`x=sqrt(x^2+y^2), y=arcTan2(y,x), z=z, t=t`. The y result is an angle in Radians or Degrees, depending on the current Rad or Deg setting. See Degrees vs. Radians. - ->Rad
- Change x from Degrees to Radians:
Sets
`x= x * 360 / 2pi`. See Degrees vs. Radians. - ->Rec
- Converts from polar coordinates (x=radius, y=theta)
to Rectangular coordinates:
set
`x=x*cos(y), y=x*sin(y), z=z, t=t`. This assumes that the original y value is an angle in Radians or Degrees, depending on the current Rad or Deg setting. See Degrees vs. Radians. - /
- Set
`x=x/y, y=z, z=t, t=t`. - x
- (Multiply) Set
`x=x*y, y=z, z=t, t=t`. - -
- Set
`x=x-y, y=z, z=t, t=t`. - +
- Set
`x=x+y, y=z, z=t, t=t`. - <-
- When you are typing in a number, this backspaces. It removes the rightmost character in the number (which is usually the last digit entered).
- >>
- Set
`x=round(y) shiftRight round(x), y=z, z=t, t=t`. Shifting right is like doing an integer division by 2, x times. For example,`16 Enter 2 >>`returns 4. - <<
- Set
`x=round(y) shiftLeft round(x), y=z, z=t, t=t`. Shifting left is like doing an integer multiplication by 2, x times. For example,`4 Enter 2 <<`returns 16. - 0
- While you are typing in a number, this appends '0' to the number.
- 1
- While you are typing in a number, this appends '1' to the number.
- 1/x
- Set
`x=1/x, y=y, z=z, t=t.` - 10^x
- Set x=10 to the x. Also called common antilog.
- 2
- While you are typing in a number, this appends '2' to the number.
- 3
- While you are typing in a number, this appends '3' to the number.
- 4
- While you are typing in a number, this appends '4' to the number.
- 5
- While you are typing in a number, this appends '5' to the number.
- 6
- While you are typing in a number, this appends '6' to the number.
- 7
- While you are typing in a number, this appends '7' to the number.
- 8
- While you are typing in a number, this appends '8' to the number.
- 9
- While you are typing in a number, this appends '9' to the number.
- A
- While you are typing in a number in Hex mode, this appends 'A' to the number.
- acos
- Set
`x=arccos(x), y=y, z=z, t=t.`The result is an angle in Radians or Degrees, depending on the current Rad or Deg setting. See Degrees vs. Radians. - and
- Set
`x=round(y) and round(x), y=z, z=t, t=t.``and`compares the two numbers bit by bit. If the both bits are 1's, the resulting number has a 1 for that bit. - asin
- Set
`x=arcsin(x), y=y, z=z, t=t.`The result is an angle in Radians or Degrees, depending on the current Rad or Deg setting. See Degrees vs. Radians. - atan
- Set
`x=arctan(x), y=y, z=z, t=t.`The result is an angle in Radians or Degrees, depending on the current Rad or Deg setting. See Degrees vs. Radians. - B
- While you are typing in a number in Hex mode, this appends 'B' to the number.
- Bin
- Display rounded numbers in binary format. See Display Options.
- C
- While you are typing in a number in Hex mode, this append 'C' to the number.
- chs
- Change the sign of x (or its exponent). See Entering Numbers.
- clrReg
- Clears the storage registers (0-F). Do it before doing Statistics. See Statistics.
- clx
- clear x: Set
`x=0, y=y, z=z, t=t.` - CoCalc
- Refresh the screen, and show some information about CoCalc, including the version number.
- cos
- Set
`x=cos(x), y=y, z=z, t=t.`This assumes that the original x value is an angle in Radians or Degrees, depending on the current Rad or Deg setting. See Degrees vs. Radians. - D
- While you are typing in a number in Hex mode, this appends 'D' to the number.
- Deg
- Trigonometric functions will be done in degrees. See Degrees vs. Radians.
- div
- Set
`x=round(y) integerDivide round(x), y=z, z=t, t=t.`Div is the result of an integer division. See`Mod`. For example,`7 Enter 3 div`returns 2. - E
- While you are typing in a number in Hex mode, this appends 'E' to the number.
- e^x
- Set x=e to the x. Also called natural antilog. e is a constant approximately equal to 2.71828183.
- eex
- If in
`Fix/Sci/Eng`modes, enter an exponent for x. See Entering Numbers. - Eng
- Display numbers in engineering notation (with 0 - F digits). See Display Options.
- Enter
- Set
`x=x. y=x, z=y, t=z.`See The Stack. - F
- While you are typing in a number in Hex mode, this appends 'E' to the number in x.
- Fix
- Display a fixed number of decimal digits (0 - F). See Display Options.
- frac
- Set
`x=the fractional part of x, y=y, z=z, t=t.` - Help
- For a description of a button,
press
`Help`then press another button. - Hex
- Display rounded numbers in hexadecimal format. See Display Options.
- int
- Set
`x=the integer part of x, y=y, z=z, t=t.` - L.R.
- Linear Regression: Sets
`x=intercept, y=slope, z=z, t=t.`See Statistics. - last x
- Set
`x=last x, y=x, z=y, t=z.`The 'last x' is saved when you do an operation (e.g.,`ln, +`) so you can recover the x value that existed before the operation. - ln
- Set
`x=the natural log (base e) of x.` - log
- Set
`x=the natural log (base 10) of x.` - mean
- Sets
`x=mean of x's, y=mean of y's, z=z, t=t.`See Statistics. - mod
- Set
`x=round(y) modulus round(x), y=z, z=t, t=t.`Modulus is the remainder of an integer division. See`Div`. For example,`7 Enter 3 mod`returns 1. - n!
- Set
`x=factorial(round(x))`, e.g., 4!=1*2*3*4. - not
- Set
`x=64bit 2's complement of round(x), y=y, z=z, t=t.` - or
- Set
`x=round(y) or round(x), y=z, z=t, t=t.``or`compares the two numbers bit by bit. If either of the bits is a 1, the resulting number has a 1 for that bit. - pi
- Set
`x=3.14159265359, y=x, z=y, t=z.` - Rad
- Trigonometric functions will be done in radians. See Degrees vs. Radians.
- recall
- Recall x from a stored value (slots
`0 - F`). For example, to recall the value in slot 5 and put it in x, press`recall 5`. See Storage Registers. - roll Dn
- roll down: Sets
`x=y, y=z, z=t, t=x.`See The Stack. - S.D.
- Sets
`x=standard deviation of the x's, y=standard deviation of the y's, z=z, t=t.`See Statistics. - Sci
- Display numbers in scientific notation (with 0 - F digits). See Display Options.
- Sig-
- Set storage registers:
`s0=s0-1, s1=s1-x, s2=s2-x^2, s3=s3-y, s4=s4-y^2, s5=s5-xy; x=s0.`See Statistics. - Sig+
- Set storage registers:
`s0=s0+1, s1=s1+x, s2=s2+x^2, s3=s3+y, s4=s4+y^2, s5=s5+xy; x=s0.`See Statistics. - sin
- Set
`x=sin(x), y=y, z=z, t=t.`This assumes that the original x value is an angle in Radians or Degrees, depending on the current Rad or Deg setting. See Degrees vs. Radians. - store
- Store x in a slot (
`0 - F`). For example, to store the x value in slot 5, press`store 5`. See Storage Registers. - tan
- Set
`x=tan(x), y=y, z=z, t=t.`This assumes that the original x value is an angle in Radians or Degrees, depending on the current Rad or Deg setting. See Degrees vs. Radians. - x^0.5
- Set
`x=square root of x, y=y, z=z, t=t.` - x<->y
- Swap the x and y register values,
`z=z, t=t.`See The Stack. - x^2
- Set
`x=x^2, y=y, z=z, t=t.` - x^,r
- Given a y value in the x register,
this sets
`x=expected x, y=correlation coefficient (r), z=z, t=t.`See Statistics. - xor
- Set
`x=round(y) xor round(x), y=z, z=t, t=t.``xor`compares the two numbers bit by bit. If one bit is 0 and the other is 1, the resulting number has a 1 for that bit. - y^x
- Set
`x=y^x, y=z, z=t, t=t.` - y^,r
- Given a x value in the x register,
this sets
`x=expected y, y=correlation coefficient (r), z=z, t=t.`See Statistics.
Return to the calculator. This is the end of the CoCalc documentation. |