Console Calculator Manual
Console CalculatorÂ is a powerful calculator with a simple console interface. Â In addition to being a highprecision calculator (300+ bits of precision), it also support base conversion, units conversion, and much more. Â The interface is convenient and easy to use. Â Create your own variables and functions, recall previousÂ entries, and quickly hide it with a keystroke. Â Many otherÂ conveniencesÂ are included that make Console Calculator a multifunction tool that engineers or software developers will appreciate.
Highprecision scientific calculator: 

Base converter: 

Units converter: 
Calculator Tutorial: The Basics
[ return to top ]
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
If you then typed, “ans / 2“, your result would be:
ans = 12
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.
Use hex and binary: “0xFF + 0b1001” would result with:
ans = 264
Use as a unit converter: “10 in>cm” converts 10 inches into centimeters. The result is how many centimeters are in 10 inches:
ans = 25.4
Valid Operators
, +, *, /  Subtract, Add, Multiply, Divide 
^  Raise to power (or exponent) ie. 3^3 = 27 
%  Integer modulo, or remainder function. ie. 7%3 = 1 
!  Factorial. i.e. 4! = 4*3*2*1 = 24 
<<, >>  Bitwise shift left, right 
&, , @  Bitwise AND, OR, XOR 
<, <=, >, >=, ==, !=  Comparison and inequalities 
&&,   Cstyle logical AND, OR (nonzero is logical TRUE) 
( ), [ ]  Parenthesis may be used 
More advanced math functions are available, such as square root and trig functions. More information on these functions is available: BuiltIn Math Functions.
ConvenientÂ Features
[ return to top ]
History: Recall Previous Entries
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.
Define Custom Functions
For example, “par(x,y) = x*y/(x+y)” creates a function which takes 2 parameters, x and y. Â Then use the function like this: “par(10,10)“Â and the result is “5â€³. Functions that you create are saved for use in future console calculator sessions. Â TheÂ “list”Â command will display all userdefined functions.
Copy 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!)
High Precision Floating Point
Arithmetic with high precision floating point numbers. Over 100 significant digits of decimal accuracy. Most calculators perform doublebyte 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.
SIUnit 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 
Save and Open Scripts
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.
CommandLine Interface Â (Windows Only)
The calculator has some commandline options that may be useful. Blind students have found it useful, and others have found it useful for automated calculations.
ccalc [inputfile] [o outputfile] [q]
 inputfile: a script file which is run immediately when ccalc starts.
 outputfile: the contents of the session are saved to this file once the CCalc window is closed.
 q: if the q tag is used, the calculator will perform the calculations in the inputfile, save results in the outputfile, and immediately quit. The console calculator window never even opens in this case. This is most useful for automated calculations.
Builtin Math Functions
[return to top ]
Builtin functions include scientific, trig and math.h compatible functions. Â Function names are caseinsensitive.
 sqrt â€“ square root
 ln â€“ natural log
 log â€“ log base 10
 logxx â€“ log base xx (log2 for log base 2, log8 for log base 8, etc)
 ln â€“ natural log
 exp â€“ exponential, e^â€¦
 sin â€“ sine
 cos â€“ cosine
 tan â€“ tangent
 asin â€“ arcsine
 acos â€“ arcosine
 atan â€“ arctangent
 sinh â€“ hyperbolic sine
 cosh â€“ hyperbolic cosine
 tanh â€“ hyperbolic tangent
 abs â€“ absolute value
 round â€“ round function, rounds up or down to the nearest integer
 ceil â€“ ceiling function, rounds up to the nearest integer
 floor â€“ floor function, rounds down to the nearest integer
 rand â€“ random number generator, with maximum value specified
 mod â€“ modulus function (remainder)
As mentioned previously, custom functions may also be created.
Calculator Options
[ return to top ]
Preferences may be set to control the look and behavior of the calculator. Note some options mentioned below are for Windows only.
Radian or Degree mode 
This effects trigonometric functions. 
Font and Colors 
Change the font, size, color, and background color. 
Displayed Base 
The base can be set to either Binary, Decimal, or Hexadecimal. 100 may be displayed as 100, 0Ã—64, or 0b1100100.Â This effects only the displayed result. 
Display Scientific Notation 
Auto: Scientific notation is only used for very small or large floating point numbers.Never: Scientific notation is never used.Always Scientific: Scientific notation is used at all times. (Scientific notation example: 123.88 is displayed as 1.23880e2)Engineering: Engineering notation is used. (Numbers are displayed with exponents in multiples of 3.)Engineering Prefix: Engineering SIunit prefixes are used. (123.88e6 is displayed as 123.88u)Financial: Constant number of decimal places. Scientific notation is never used. 
Max Significant Figures 
Maximum number of significant figures to display, used when displaying in scientific notation. (Significant figures are not applied to integers unless they are being displayed in scientific notation.) 
Display Thousands Separator 
For certain large numbers, when not using scientific notation, it is helpful to use a thousands separator, such as a comma. For example: 12,888.12. Note that this is for display only; separators are not recognized when entering an equation. 
Twoâ€™s Complement 
When displaying HEX or BINARY values, negative values can optionally be displayed as twoâ€™s complement notation. 
Transparency 
Transparency of the window may be adjusted between 0% and 100%. 
Command History Size 
Number of stored previous entries. 
Always on Top 
When enabled, the window will float above all other windows. Â Indicated also by a pushpin icon in the calculator window. 
Snapto 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. 
Allow multiple instances 
When enabled, multiple CCalc.exe windows (instances) can be running at the same time. Otherwise, only a single CCalc window can be active, and this window will be brought to the forefront if CCalc.exe is opened again. 
Reassign Calculator AppKey 
Certain keyboards have a calculator appkey, which opens the windows calculator by default. If this box is checked, Console Calculator willÂ become the default application when the appkey is pressed. (This is accomplished by editing the Windows registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ Windows\CurrentVersion\Explorer\AppKey\18 ) 
Autoevaluate 
When enabled, current expression is calculated as it is typed in the Status Bar.Â Enable the Status Bar in the Options menu or CtrlB. 
European style delimiters 
When enabled, this essentially swaps the meaning of the comma “,” and period “.” from the US custom, so that a period separates thousands and comma indicates decimals. Â For example, with european styleÂ 1,024.56 would be 1.024,56. This will also effect the character used to separate arguments in a function.Â instead of f(x,y) you must use f(x.y) to separate the x and y arguments. 
10Key Calculator Mode 
When enabled, the calculator behaves as a 10key calculator. Basically, a tenkey assumes that you are adding a series of numbers. Consequently, the fundamental operation consists of entering numbers and their signs, which the application will sum:
1) Enter number. Examples: 2+ 3+ => 5 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: 2+++ => 2+ 2+ 2+ => 6 
Calculator Commands
[return to top ]
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. 
del X (or rem X)  Deletes userdefined function or variable X. To delete all stored variables, use del all. 
disp X  Prints a variable name and value. 
display [dechexbin]  Sets the display base, such as display hex 
echo text string  Prints a text to console (useful for scripting). 
european [onoff]  Turns european delimiters on/off. 
exit  Exit the calculator. 
list  Lists all userdefined functions. 
mode [raddeg]  Sets to radian or degree mode. 
scimode [autoneveralwaysengprefixfinance]  Sets the scientific display mode preference. 
sigfigs X  Sets the number of max significant figures to X. 
unit newunit  Define a new unit type for units converter. 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.
Set display base: 
Shortcut: 
Binary (base 2)  Ctrl1 
Decimal (base 10)  Ctrl2 
Hexadecimal (base 16)  Ctrl3 
Using Decimal, Hex and Binary
Decimal numbers are assumed, but you can specify a number as binary with a “0b” or hex with a “0x“.
The number 15 (decimal) in different bases:
Decimal: 15
Binary: 0b1111
Hexadecimal: 0xF
For example, “15 + 0Ã—5 + 0b101” would result with:
ans = 25
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 32bit 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 nonSI 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 greaterthan sign, “>”), and finally the unit to convert to. Â If you need a unit that is not a builtin, 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.
Description 
Example 
Result 
Get conversion factor  in > cm  ans = 2.54 
Inches to centimeters  20*5 in > cm  ans = 254 
Miles per hour to meters per second  70 mi/h>m/s  ans = 31.2928 
Newtonmeters to milljoules  50 Nm>millijoules  ans = 50000 
Square meters to acres (4 examples) 
10000 m^2>acres 10000 m^2>acre 10000 m*m>acre 10000 mm>acre 
ans = 2.4710538 
Define a new unit: furlong  unit furlong = 201.168 meters  new unit created! 
Table of BuiltIn Units and Abbreviations

