Calculator Tutorial: The Basics: High-Precision Scientific Calculator
Calculator Tutorial: The Basics: High-Precision Scientific Calculator
Calculator Tutorial: The Basics: High-Precision Scientific Calculator
At the “> ” prompt, type a mathematical expression or formula and press enter to calculate the result. For
example, after the prompt, type “4+5*4” followed by the enter key. The result would be:
ans = 24
To perform a quick calculation on the previous result, instead of typing “ans“, you may type the operator
(*, /, +, or -) at the new prompt and the “ans” will be inserted automatically. For example, type “+” at the
beginning of a new line, and “ans+” will automatically appear. The “-” key is an exception. The first “-” will
be interpreted as a negative sign. Type the “-” key twice at the beginning of the prompt line to be replaced
with “ans-“.
Put multiple calculations in a single line, separated by a semicolon. “m = 5; m+2” would result with:
ans = 7
Using a semicolon also suppressed the result from being displayed, similar to Matlab. This is useful when
making script files.
Valid Operators
-, +, *, / Subtract, Add, Multiply, Divide
More advanced math functions are available, such as square root and trig functions. More information on
these functions is available: Built-In Math Functions.
Convenient Features
[ return to top ]
You may press the up or down arrows to quickly copy previous entries to the current prompt, similar to a
UNIX console.
Create Variables
For example, “m = 25” creates a variable m which can be used in later calculations. The variable pi =
3.14159… is predefined. The variable ans is always equal to the previous result.
If you copy with no text selected, the previous result is automatically placed into the clipboard and ready to
paste into another application. (Only the numerical answer is copied, the “ans =″ text is not!)
Arithmetic with high precision floating point numbers. Over 100 significant digits of decimal accuracy.
Most calculators perform double-byte floating point calculations, which are 64 bit structures. Console
Calculator gives you not 64 bits or 128 bits but (352 bits of arithmetic accuracy! This is nearly
astronomical precision.
SI-Unit Prefixes
You may use metric unit prefixes appended to the end of a number to automatically adjust units. For
example, “5M + 100k” + enter would result with:
ans = 5100000
Metric Prefixes:
Peta- P 10^15 1 000 000 000 000 000
Tera- T 10^12 1 000 000 000 000
Giga- G 10^9 1 000 000 000
Mega- M 10^6 1 000 000
kilo- k 10^3 1000
centi- c 10^-2 0.01
milli- m 10^-3 0.001
micro- u 10^-6 0.000 001
nano- n 10^-9 0.000 000 001
pico- p 10^-12 0.000 000 000 001
femto- f 10^-15 0.000 000 000 000 001
atto- a 10^-18 0.000 000 000 000 000 001
You may save the contents of the current console to a script file which may be run again at a later time.
Each line of a script file must be a valid mathematical expression and commands may be seperated by
semicolons. Script lines ending with a semicolon will have their console output suppressed when
run. Lines beginning with # sign are ignored as comments.
Mac OS X Note: A script file is just a plain text file, but the *.script extension is assigned to Console
Calculator.
Command-Line Interface (Windows Only)
The calculator has some command-line options that may be useful. Blind students have found it useful,
and others have found it useful for automated calculations.
Built-in functions include scientific, trig and math.h compatible functions. Function names are case-
insensitive.
Preferences may be set to control the look and behavior of the calculator. Note some options mentioned
below are for Windows only.
Font and Colors Change the font, size, color, and background color.
When enabled, the window will float above all other windows. Indicated
Always on Top
also by a pushpin icon in the calculator window.
Snap-to Screen Edge When enabled, the window will snap to screen edged when moved.
Minimize to system tray When enabled, the calculator will minimize to a system tray icon.
1) Enter number.
2) Enter its sign.
3) Repeat steps 1 and 2 as desired.
Examples:
A tenkey also keeps the last number you entered in its cache; if you
enter another operator without explicitly typing a new number, the
tenkey will use the contents of the cache.
Examples:
Several of the options above can be scripted or changed via commands at the prompt. Below are the
available commands.
Command List:
clear or cls Clear the screen text.
Deletes user-defined function or variable X. To delete all stored
del X (or rem X)
variables, use del all.
disp X Prints a variable name and value.
display [dec|hex|bin] Sets the display base, such as display hex
echo text string Prints a text to console (useful for scripting).
european [on|off] Turns european delimiters on/off.
exit Exit the calculator.
list Lists all user-defined functions.
mode [rad|deg] Sets to radian or degree mode.
scimode
Sets the scientific display mode preference.
[auto|never|always|eng|prefix|finance]
sigfigs X Sets the number of max significant figures to X.
Define a new unit type for units converter.
unit newunit
See below.
gospel The good news.
Base Converter
[return to top ]
This calculator interprets several different numerical bases and can convert from one base to another. You
may change the displayed base in the “Options” menu or using the keyboard shortcuts shown below.
Holding down the shift key while changing the base will display the previous answer in the new base
without changing the default base permanently.
Decimal numbers are assumed, but you can specify a number as binary with a “0b” or hex with a “0x“.
Decimal: 15
Binary: 0b1111
Hexadecimal: 0xF
Two’s Complement
When viewing negative numbers as binary or hex, two’s complement notation is optional. Two’s
complement is the way that computers typically store signed integers in memory. For example, -5 could be
displayed in hex as a 32-bit two’s complement, which would be 0xFFFFFFFB rather than -0×0005. This
can be a handy option for software developers, though it is off by default.
Unit Converter
[return to top ]
CCalc is also a fully featured units conversion utility. Convert from SI units to non-SI units. Convert
between units of length, area, volume, force, and many other types of units in a convenient way. Simply
enter the number and unit you are converting from, type the convert operator (a minus and greater-than
sign, “->”), and finally the unit to convert to. If you need a unit that is not a built-in, you can define your
own custom units! Once created, new unit definitions are saved permanently in the ccalc_functions.txt for
future console calculator sessions. Below are some unit conversion examples.
gram AU astronomicalUnit
second Bq becquerel
ampere cd candela
kelvin C coulomb
mole eV electronVolt
candela F farad
ft foot
SI-Derived Units
gal gallon
radian meter/meter gr grain
steradian meter^2/meter^2 g gram
hertz /second Gy gray
newton meter-kilogram/second^2 ha hectare
pascal kilogram/meter-second^2 H henry
joule meter^2-kilogram/second^2 Hz hertz
watt meter^2-kilogram/second^3 h hour
coulomb second-ampere hr hour
volt meter^2-kilogram/second^3-ampere in inch
farad second^4-ampere^2/meter^2-kilogram J joule
ohm meter^2-kilogram/second^3-ampere^2 K kelvin
siemens second^3-ampere^2/meter^2-kilogram L liter
weber meter^2-kilogram/second^2-ampere lm lumen
tesla kilogram/second^2-ampere lx lux
henry meter^2-kilogram/second^2-ampere^2 Mx maxwell
lumen candela-steradian m meter
lux candela-steradian/meter^2 mi mile
becquerel /second min minute
gray meter^2/second^2 mol mole
sievert meter^2/second^2 N newton
oz ounce
Non-SI Units
pc parsec
acre 4.04685642E3meter^2 Pa pascal
angstrom 1.0E-10meter qt quart
astronomicalUnit 1.495979E11meter lb pound
atmosphere 1.01325E5pascal rad radian
bar 1.0E5pascal rpm revolutionPerMinute
calorie 4.1868joule s second
cup 0.236588236liter sec second
curie 3.7E10becquerel S siemens
day 8.64E4second Sv sievert
degree 1.745329E-2radian sr steradian
electronVolt 1.60219E-19joule T tesla
erg 1.0E-7joule tbsp tablespoon
faraday 9.648531coulomb tsp teaspoon
fermi 1.0E-15meter V volt
foot 3.048E-1meter W watt
gallon 16cup Wb weber
gauss 1.0E-4tesla wk week
gilbert 7.957747E-1ampere yd yard
grain 6.479891E-5kilogram yr year
hectare 1.0E4meter^2
hour 3.6E3second
inch 2.54E-2meter
lightYear 9.46073E15meter
liter 1.0E-3meter^3
maxwell 1.0E-8weber
mho 1.0siemens
micron 1.0E-6meter
mil 2.54E-5meter
mile 1.609344E3meter
minute 6.0E1second
ounce 28.3495231gram
parsec 3.085E16meter
pica 4.233333E-3meter
pint 2cup
pound 4.535924E-1kilogram
quart 4cup
revolution 6.283185radian
revolutionPerMinute 1.047198E-1radian/second
tablespoon 0.0625cup
teaspoon 0.0208333cup
week 6.048E5second
yard 9.144E-1meter
year 3.1536E7second