SourceForge.net

Support This Project

Go to project download page:

Qmcalc

What is it:

Qmcalc is a multi-function, multi-memory, programmable scientific calculator. with about the same capabilities of a Ti-82 Graphic Scientific Calculator minus a few unimplemented features, but also a few extras not included with the original Ti-82 graphic calculator.

What does it do:

Programmable graphic scientific calculator. Include functions for: trigonometry, logarithms, base conversions, statistics, combinatronics, fraction arithmetic, bit wise logic, Basic programming, and calculus.

How to use it:

SYNTAX:
For text mode operation: mcalc [math expression] | [-i <input filename>][-o <output filename>]
For GUI mode operation: qmcalc

- [math expression] is any valid mathematical expression containing numeric values, arithmetic operators, brackets, function calls, commands, program execution calls, variable names, constant names or string literals.
brackets: {, }, [, ], (, )
function calls: Sin, Tan, Cos, Arcsin, Arctan, Arccos, Sinh, Cosh, Tanh, Sqr, Sqrt, Cube, Cubert, Exp, Log, Log10, Ceil, Floor, Abs, FracPart, IntPart, Rnd, Comb, Perm, CombRep, PermRep, ItemPerm, ItemComb, ItemPermRep, ItemCombRep, Min, Max, Deriv, Deriv2, Integ, Rand, Inv, Solve, Intersect, Fmin, Fmax, MatSolve, Round, Frac, ToHex, ToOct, ToBin, ToCmp2Bin, FromHex, FromOct, FromBin, FromCmp2Bin, PolToRecX, PolToRecY, RecToPolR, RecToPolA, Sum, Prod, AvgMean, AvgMed, AvgMode, StdDev arithmetic operators: =, +=, -=, *=, /=, @=, Not, And, Or, Xor, <, >, <=, >=, ==, !=, +, -, *, /, @, ^, %, Fact, E
commands: Show, Eval, Precision, GetPrecision, Mode, DumpVars, GraphAllPts, SetRecur, Help
program execution calls: exec <program name>
variable names: $A ... $Z, ANS, ANSSTR, FRACANS
constant names: PI, E
string literals: "hello", "world"
numeric values: 10, -3, 450.231, 4.52e3, 4527.5e-3 (e for scientific notation)

Variables from $A through $Z can also be used to store results from math operations. The information stored in these variables can be later used in place of numeric values in a math expression, in which case the value currently stored in the variable location will be substituted into the math expression before the evaluation of the expression takes place. In addition to numeric values these variables can also store string values such as "hello world" or "$B^2". Concatenation of strings can be performed using the append operator +=, so if $A currently contains "x^2 + 2*x", $A += " + 4" would set $A to contain "x^2 + 2*x + 4". String comparisons between different string variables can be performed using the comparison operators ==, !=, <=, >=, <, >. Literal strings like "hello" must first be put into string variables before the string comparison operators can be used. The contents stored within string variables can be evaluated as a mathematical expression by using the EVAL command. For example: the variable $A can contain the string "$B^2" and the command EVAL($A) would give the result of the contents currently stored in the variable $B squared.

Also, variable assignments can accept pasted text from the desktop environment clipboard. The evaluated results will be stored in the variable or the pasted expression can be stored in the variable in the form of a string (enclosed in " ") that can be evaluated later using the EVAL command.

Note: to avoid infinite recursion which will stall the program, evaluation of variables names within string variables will by default be evaluated up to 26 levels deep. This means that you can nest variable names such as $B within another variable like $A and continue on with another variable name nested within $B and so on, up to 26 levels deep of nesting. The program will simply refuse to process expressions that nest variables more than the set recursion limit and display an error message. To increase or decrease the recursion limit, use the command "Set Recur=" with the desired limit placed after the equal sign.
Note: hexadecimal and octal based arithmetic can also be performed. All hexadecimal and octal input values must be integers only. Note when entering hexadecimal values a "0x" prefix must be entered before the actual hex digits. When entering octal values a "0" prefix must be entered before the actual octal digits. To avoid confusion and unnecessary complexity when processing math expressions, hexadecimal and octal values are only valid for the following functions, variables, constants and operators:


Note: With the graphical calculator you can enter directly into the text editor window by clicking on it and entering your information from the keyboard. This is useful for when you want to type in characters not found on the calculator keypad.

Entering "quit" from the interactive prompt will stop the programn This help message will be displayed by entering "help" on the program's interactive prompt or by specifying --help as an argument on the shell command line.
Function specific help will be displayed by entering "help" <name of function> on the shell command line. For example: "help deriv" will display a help screen specific to the derivative command. Functions that do not have specific help screens are simple and self explanatory from the general help screen. Help documentation can be accessed in graphics mode by clicking on the help button on the calculator interface. Function specific help can be accessed in graphics mode by clicking on the link for each calculator command.

different angle units can be specified by entering: mode=radian or mode=degree
different precision units can be specified by entering: precision=float, precision=double, precision=longdouble or precision=longnum

with each unit having a digit precision of:

Each precision unit: float, double, long double, long number is actually an individual calculator and each calculator has its own set of 26 letter variables for DECIMAL value storage, excluding string variables which are shared globally. By default all variables of a calculator are transferred over to the new calculator after a precision unit change.
Alternatively you can choose not to do this and have each calculator preserve its own set of decimal variables by specifying ",keepvars" after the precision unit name in the precision command. example: precision=longnum,keepvars which will skip tranferring variables from the previous calculator to the long number calculator.

Warning: when you use base conversion commands: ToHex, ToOct, ToBin, ToCmp2Bin, FromHex, FromOct, FromBin, FromCmp2Bin
any assignment to variables: $A...$Z will assign to the long number calculator variables as well as the variables in the currently used calculator

The full unit name and precision information as shown in the format above can be retrieved by entering the "get precision" command at the command line On the program's interactive prompt the current settings for angle units and the unit's digit precision are displayed as MCALC:<prec>:<angle>

where <prec> can be any one of:

where <angle> can be any one of:

The arguments to the program can be entered directly from the command line or from an input file. Alternatively mcalc can be run interactively by typing mcalc on the command line without any arguments. While in interactive mode command line continuation for long commands which spans more than one line can be accomplished by entering the back slash character "\\" at the end of a line. The continuation character is not required in graphics mode and commands may span multiple lines with the "Enter" key pressed to indicate the end of a command. Pre-written calculator program files can also be loaded and executed either interactively or from an input file enter "help exec" for more information on writing and running calculator programs.

When entering from an input file enter the name of the input file after the program name and "-i". Each line of the input file should contain the same arguments that you would normally type from the command line to perform the calculation.

Metric to English unit conversions

Metric to/from English unit conversions can be accomplished by executing the following programs using the EXEC command:

Length unit conversions lencon.prg
Area unit conversions areacon.prg
Volume unit conversions volcon.prg
Weight unit conversions wgtcon.prg
Power unit conversions powcon.prg
Energy unit conversions energycon.prg
Angle unit conversions anglecon.prg
Temperature unit conversions tempcon.prg

Area and volume of common shapes

Two programs are provided to determine the area and volume of common shapes

To determine the area of common plane figures execute area.prg
To determine the surface area and volume of common shapes execute volume.prg

Calculator test programs and input files

The following program and data input files are provided for testing the calculator:

sample.prg program for testing general calculator operations.
sample2.prg test program file called from within sample.prg.
dice.prg program for playing a simple game of dice.
pyth.prg program to determine the length of the hypotenuse of a right angle triangle using the Pythagorean theorem.
loan.prg sample loan calculation program with function graph output. graphics output can only be shown on GUI mode calculator.
calcinteg.prg program to calculate an approximation of an integral by using Taylor polynomials.
statdata.dat Statistics data file for testing file input on calculator statistics functions.
testcalc.in Calculator test data input file for testing all operations of the calculator.

Program Options

-i <filename> : specify an input file
-o <filename> : specify an output file (Default: standard display output)
mcalc with no arguments to run interactively in text mode.
qmcalc with no arguments to run in GUI mode

For further details you can download the Qmcalc calculator program and browse through the documentation by clicking on the help button located on the calculator panel. Documentation for all calculator functions and calculator programming commands are covered.

Support This Project

Go to project download page: