Syntax: Operand0 Operator0 Operand1 Operator1

Example: 5 + 4 * 3

Brackets:

Example: ((123 - 43) * 23) ^ (3 - 1)

Note: You can also use the other brackets {}[].

Variables:

Definition: x = 3 + 4

Using: 3 + x

Functions:

Definition: f(x) = 3x + 4

Using: f(5 + 2) or f 3

Note: Spaces are always optional.

Calculation precedence

Execution order from first to last:

- QCalc script commands

- Variable and function assignments

- Brackets

- Standard functions

- User defined functions

- Round

- Power, Radical, Logarithm

- Multiplication, Division, Modulus

- Addition, Subtraction

- Bitshift, Bitrotation

- Comparisons

- Equal / Not equal

- Bitwise And

- Bitwise XOr

- Bitwise Or

- Logic And

- Logic Or

Values

Operands can contain floating numbers between +-5.0E-324 and +-1.7E308.

Technical base is the data type "double".

Booleans

You can enter boolean values with following meaning:

False = 0

True != 0 (True is converted to 1)

Numeral systems

Output: QCalc can output calculation results as hexadecimal, ocatal, and binary integers.

You can switch the output format using the menu or shortcuts Ctrl+Alt+[X / O / B].

Input: Integer literals in other numeral systems are converted before the calculation is performed.

Care for not mixing up those literals with function or variable names.

Numeral system | Beginning | Example | Decimal |
---|---|---|---|

Hexadecimal | 0x or 0X | 0x1A | 26 |

Octal | 0o or 0O | 0o10 | 8 |

Binary | 0b or 0B | 0b101010 | 42 |

Operations:

Name | Sign | Example | Result | Comment |
---|---|---|---|---|

Addition | + | 1 + 2 | 3 | |

Subtraction | - | 2 - 1 | 1 | |

Multiplication | * | 3 * 2 | 6 | |

Division | / | 6 / 3 | 2 | |

Modulus | mod | 5 mod 3 | 2 | |

Power | ^ | 2 ^ 10 | 1024 | |

Radical | root | 2 root 9 | 3 | Left operand is the base |

Logarithm | log | 2 log 8 | 3 | Left operand is the base |

Round | rnd | 2 rnd 3.14159 | 3.14 | First operand = number of dezimals |

Bitshift | <<, >> | 16 >> 2 | 4 | |

Bit Rotation | lrot, rrot | 0b1010101 rrot 1 | 0b10000000000000000000000000101010 | Bitwise rotation of 32bit Integer |

Comparison | <, <=, >, >= | 5 <= 6 | 1 | Result: 1 => True, 0 => False |

Equal, Not equal | ==, != | 5 == 42 | 1 | |

Bitwise And | & | 0b101010 & 0b110011 | 0b00100010 | |

Bitwise Or | | | 0b101010 | 0b110011 | 0b00111011 | |

Bitwise XOr | xor | 0b101010 xor 0b110011 | 0b00011001 | |

Logic And | && | true && false | 0 | |

Logic Or | || | true || false | 1 |

Standard functions:

Name | Sign | Example | Result | Comment |
---|---|---|---|---|

Sine | sin | sin (Pi / 2) | 1 | |

Cosine | cos | cos (Pi / 2) | 0 | |

Tangent | tan | tan (Pi / 4) | 1 | |

Arcussine | asin | asin 1 | Pi / 2 = 1.5707963268 | |

Arcuscosine | acos | acos 1 | 0 | |

Arcustangent | atan | atan 1 | Pi / 4 = 0.7853981634 | |

Hyperbolic sine | sinh | sinh 1 | 1.1752011936 | |

Hyperbolic cosine | cosh | cosh 1 | 1.5430806348 | |

Hyperbolic tangent | tanh | tanh 1 | 0.761594156 | |

Absolute value | abs | abs -15 | 15 | |

Factorial | fact | fact 5 | 120 | Arguments will be rounded |

Sinus Cardinalis | sinc | sinc 0 | 1 | |

Sigma | sigma | sigma 0 | 1 | |

Delta | delta | delta 0 | 1 | |

Natural logarithm | ln | ln (e ^ 2) | 2 | |

Dual logarithm | ld | ld 8 | 3 | |

Decimal logarithm | lg | lg 1000 | 3 | |

Square root | sqrt | sqrt 64 | 8 | |

Not | ! | !true | false | |

Negation | ~ | ~0b101010 | 0b11111111111111111111111111010101 |

More about variables:

Variable names are NOT case sensitive.

This means that "test" is treated like "TesT" and "PI" like "pi".

Automatically created variables:

ans = last calculation result

this variable is updated every time a calculation was successfull

rand = random value between 0 and 1

this variable is updated every time it is used

Function drawing:

You can have your functions drawn by the program.

Just click on on "View / Draw functions" to open the draw form.

Select the functions to be drawn. You can select more than 1 function if you press

"ctrl" or "shift" while clicking.

Wait for the result.

Pressing "F5" will cause the program to recalculate the function drawing points.

You can alter the zoom and you can move the origin.

Decimal sign:

This program uses the standard number interpretation of the system.

This means the decimal sign depends on the language settings.

This means if your system is set to English the point "." is the decimal sign.

If your language is set to German it is the comma ",".

Angle mode (Degree <-> Radians):

You can switch the anglemode by clicking on the "Angle"-menuitem.

Special signs:

QCalc accepts some special signs which are converted before calculating.

Special sign input | Converted input |
---|---|

² | ^2 |

³ | ^3 |

% | /100 |

‰ | /1000 |

¼ | 0.25 |

½ | 0.5 |

¾ | 0.75 |

And you can load a QCalc-File using the File->Load file - menu.

Drag & Drop:

Load files or text by simply dropping it on the window.

Custom initialization:

If existing QCalc executes the file "[user]/MyDocuments/QCalc/init.qcalc" for a custom startup if running under Windows.

It will be "/home/[user]" under Linux and "/Users/[user]" on Macs.

If not existing it tries to execute a fallback initialization file in the same folder as the application.

Script commands:

Script commands begin with a '#'.

Parameters are separated by a ','.

Commands are not case sensitive.

Following commands are available:

Command | Description | Example |
---|---|---|

#clr | Clear calculation list | #clr |

#draw [fctname1], [fctname2], [...] | Open function draw window and select given function (without e.g. "(x)") | #draw f, g, bell |

#log [text] | Write text into the log | #log Text without quotation marks but only one line |

#echo [text] | Write text to the calculation list | #echo Same as above, comments will not be shown |

#SetOrigin xOffset, yOffset | Set origin of draw function form in pixels | #SetOrigin 200, -400 |

#SetScale xScale, yScale | Set scale of draw function form | #SetScale 20, 10 |

#Redraw | Redraws selected functions | #Redraw |

#exec [path] | Executes given file | #exec /init.qcalc |

#DecSign [comma / point / default] | Sets decimal sign to comma or point or system language's default | #DecSign default |

#AngleMode [rad / deg] | Sets angle mode to degree or radiant | #AngleMode rad |

#Multiline [single / multi] | Sets the multiline-mode | #Multiline single |

#OutFormat [dec / exp / hex / oct / bin] | Sets the output format | #OutFormat hex |

#exit | Close the application | #exit |

Control structures:

If | While | ||
---|---|---|---|

Syntax | Example | Syntax | Example |

if [condition] ... elseif [condition] ... else ... endif |
#clr x = 5 if x <= 5 #echo x < 5 if x < 5 #echo x < 5 else #echo x == 5 2 endif elseif x > 5 #echo x > 5 else #echo x == 5 1 endif |
while [condition] ... break ... continue ... loop |
#clr x = 0 y = 0 while x < 6 while y < 3 y = y + 1 loop y = 0 x = x + 2 loop |

Comments:

Everything right of '//' (including these characters) will be ignored at calculation.

Drag & Drop:

Load files or text by simply dropping it on the window.

Custom initialization:

If existing QCalc executes the file "[user]/MyDocuments/QCalc/init.qcalc" for a custom startup if running under Windows.

It will be "/home/[user]" under Linux and "/Users/[user]" on Macs.

If not existing it tries to execute a fallback initialization file in the same folder as the application.

Command-line arguments:

Execute a file by giving its relative or absolute path as command-line parameter.

Or execute lines of operations. Note: Commands will be separated at spaces. So make

sure you use "" to keep a line in one piece.

Calculation log:

You can enable and disable the calculation log.

If active it will save the steps of the last calculation in

the file "log.txt" in the same folder as the executable.

Built: 2013-02-03

This programm was developed by Philipp Erler.

Mail me for feedback, version requests etc.: ph.erler@gmx.net

Look at http://www.hs-esslingen.de/~pherit00/website/index.htm

.Net - Framework 4.0 or Mono-runtime 2.10.5-1 must be installed.

Get .Net - Framework 4.0 from here

Get Mono-Runtime from here

For Ubuntu: You can also download Mono from the software center.

For Windows:

Just double-click the QuickCalculator.exe.

If it is not starting install your updates.

For Linux:

Start this exe-file by using the "mono QuickCalculator.exe" command.

For Ubuntu etc.:

In the file manager right-click on the executable and select "Open with Mono Runtime"

or "Open with Command" and enter the same as above.

For Ubuntu 11.10 Unity:

View this for creating an own desktop launcher:

http://www.ubuntugeek.com/how-to-create-desktop-launchers-in-ubuntu-11-10oneiric.html

Or copy the downloaded files to /etc/QCalc and drag the QCalc.desktop to the launcher-bar.

If you get this Warning: Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

solve it by installing this: "sudo apt-get install gtk2-engines-pixbuf"

For Mac:

Use the .app to start a program with mono.

For further information about the legal stuff view the

disclaimer:

http://www.hs-esslingen.de/~pherit00/website/disclaimer.htm

basic functionality

0.1.0.0

comfort functions:

left click on listitem:

entered calculation => copy into input textbox

result => append on textbox text

result error => do nothing

0.2.0.0

trigonometry:

sin

cos

tan

atan

0.3.0.0

array out of bounds error fixed

occurred when entered calculations and clicked under the last item of the listbox

0.4.0.0

menu added:

rad <-> deg conversion

Pi, Phi and e (base of the natural logarithm)

round function (standard round to 10 digits)

0.5.0.0

menu improved:

all symbols

variables added:

assign a value to a var using this: VarName <= Value

Example: x <= 1 - 5

get a variable value just by entering its name

Example: 1 + Pi

Result: 4.14159...

Some other variable functions like "print all variables" and "delete all variables"

0.6.0.0

Calculation system restructured to make it more flexible for whatever comes

You can now delete a single variable by clicking on its menu entry

Added function support

You can now add, delete and use function

Added appendand menu entries

0.7.0.0

Function draw form added:

You can now have your functions drawn.

You can alter the zoom and origin.

Unfortunately the calculation is quite slow.

Make it better if you can.

0.8.0.0

Optimized code (calculation is now a bit faster)

Improved code readability

Smaller comfort improvements

Comfortable view modification using ZoomBox or MoveOriginArrow

0.9.0.0

Fixed some bugs

added arcussine etc.

added random variable "rand"

added wicked looking icon as application logo

0.10.0.0

added auto completion

improved copy-result-to-input-text comfort

added some more constants

0.11.0.0

added keyboard for mouse control

fixed some bugs

0.12.0.0

changed syntax

fixed bugs

0.13.0.0

added IntelliKeyBoard

fixed even more bugs

0.14.0.0

improved IntelliKeyBoard

you can now save your graphs to a picture file

you can now save your calculations and their results to a textfile

fixed a bug causing the keyboard to grow infinitely

you can now choose the color used to draw your functions

0.15.0.0

fixed bug concerning unary minus in brackets

you can now view the calculation log

you can now execute (*.qcalc) files

Everything right of '//' (including the signs) will

not be calculated.

Command-line arguments and drag & drop now work

Fixed a bug causing critical errors after inserting several symbols

Fixed mixe-up of buttons on draw form

Added script commands

Added sigma, delta, fact and sinc

Removed Intellikeyboard

0.15.1.0

Added basic tweaks for running with Mono

Added %, ‰, ², and ³ replacements

Some minor bugfixes and a bigger one

Added ln, lg, ld, and sqrt as functions

0.15.2.0

Fixed bug concerning brackets

Changed description of sigma and delta -> heavyside and dirac

0.15.3.0

Fixed bug concerning brackets

0.15.4.0

Functions and variables are now really case insensitive (again).

0.15.5.0

Added Output formats: Hexadecimal, Octal, Binary, Decimal, Exponential.

Added other numerial systems for input: Hex, Oct, Bin as literals

Added boolean and bitwise operations

1.0.0.0

Fixed mixed up operator precedence

Added If and While to Scripts

1.0.1.0

Standard view does not set accuracy to 5 anymore

#draw now refreshes the list of functions on the draw window

You can now use other brackets []{} to make your skripts more readable

Added clear messages when a (partial) calculation results in a complex number