reactos/base/applications/calc/help.txt
Carlo-Bramini 295eaf4e32
[CALC] Improve multi-precision support, and powers/roots. CORE-8486
- Added support for average of squares and mean of squares into statistical functions.
- pop() and push() functions in RPN engines now work with nodes instead of stack units.
- Moved the POW and SQR operations near the operators.
CORE-12766

- Fix number of digits for IEEE-754 constants.
- Show all available digits in exp notation.
CORE-14871

- Update help correspondingly.
2019-03-18 01:34:00 +01:00

515 lines
19 KiB
Plaintext

ReactOS Calc is a programme for evaluating mathematical, financial and statistical calculations.
ReactOS Calc has several features including:
- Internal precision with 17 decimal numbers (standard IEEE math library).
- Up to 512 bits of internal precision and 64 decimal digits displayed in the output display (with GNU multi-precision libraries).
- Robust RPN (reverse polish notation) engine which allows a virtually unlimited number of arithmetic and algebraic sub-expressions.
- Three different interfaces: standard, scientific or conversion.
- Many common arithmetic, algebraic and statistical functions are included.
The following topics will be discussed:
HOW TO INPUT NUMBERS
DISPLAY FORMAT
ERROR MESSAGE
ARITHMETIC FUNCTIONS
LOGICAL FUNCTIONS
ALGEBRAIC FUNCTIONS
TRIGONOMETRIC FUNCTIONS
THE PI BUTTON
HYPERBOLIC FUNCTIONS
STATISTICAL FUNCTIONS
MEMORY FUNCTION
DEGREE CONVERSION
FIXED SCIENTIFIC NOTATION
PERCENT MODE
HOW TO INPUT NUMBERS
--------------------
The ReactOS Calc provides some buttons for typing numbers and expressions.
However, some of them are available only into Standard, Conversion or Scientific modes, or when the calculator is in a specific state.
[0], [1], [2], [3], [4], [5], [6], [7], [8], [9]
Digit buttons: they are used for entering digits into the display.
[A], [B], [C], [D], [E], [F]
Hexadecimal buttons: they are used for completing an hex number. For using these buttons, the calculator must be configured into scientific mode and the [HEX] state must be selected.
[.] or [,]
Decimal point: used for starting the non integer part of a decimal number.
[+/-]
Change sign: if it's pressed after a calculation or when entering the operands, it will change the sign of the number shown into the output display.
[BACK]
If the displayed number has been entered manually and it isn't a result of a calculation, you can delete the last digit by pressing this button.
[CE]
This button removes an incorrect number from the output display. All pending operations are preserved.
[ C ]
It clears the output display and all pending operations.
DISPLAY FORMAT
--------------
You can enter digits by pressing the buttons mentioned in the <HOW TO INPUT NUMBERS> section.
These numbers can be entered into four different bases: hexadecimal, decimal, octal or binary system.
A number shown into the output display can be easily converted from a numeric base to another by simply changing the base on the fly.
When working with pure decimal numbers, the user can enter the numbers in two ways:
- Normal mode: each number is entered its integer part and, eventually, its fractional part.
- Exponential mode: the number is entered by typing a mantissa and then an exponent. This method allows you to write very big or very small numbers that you would not be able to type in a different manner. You can use it only when the calculator is configured in scientific mode.
However, there are some limits even when you work with exponential notation.
These limits are:
-1.79769313486231570e+308 <= x <= -2.22507385850720140e-308
2.22507385850720140e-308 <= x <= 1.79769313486231570e+308
The exponential input mode is activated by the [Exp] button.
After the mantissa has been typed, by pressing this button you will be able to enter the exponent.
When the support for GNU multi-precision libraries is activated, these limits rise greatly to 64 displayed digits for the mantissa and 8 digits for the exponent, both with sign.
When the calculator is in [HEX], [OCT] or [BIN] state, it's possible to apply a masking for limiting the range of the numbers. Four range are available:
[QWORD]
It limits the integers to 64 bit numbers.
[DWORD]
It limits the integers to 32 bit numbers.
[WORD]
It limits the integers to 16 bit numbers.
[BYTE]
It limits the integers to 8 bit numbers.
ERROR MESSAGE
-------------
The output display will show the message "Error" if the current calculation overflows the limits of the calculator, or when an undefined condition is generated (example: division by zero).
The error condition is cleared using the [ C ] button.
ARITHMETIC FUNCTIONS
--------------------
ReactOS Calc implements the standard arithmetic rules with the following operators:
[+]
Addition
[-]
Subtraction
[*]
Multiplication
[/]
Division
[Mod]
Remainder of a division
Those rules express the concept of priority.
Here there is a list of priorities implemented from the highest to the lowest:
- Special functions which change directly the current value into a new one: trigonometrics, hyperbolics, exponentials and logarithms, reciprocal, base conversions, integer and fractional part detection and change of sign.
- Power and root functions.
- multiplications, divisions, reminders.
- additions, subtractions.
- Logical functions.
These rules may be overcome by using parentheses.
With [(] and [)] buttons, the user can isolate a mathematical expression to be evaluated separately. The number of parentheses into a single expression is virtually unlimited. The number of currently-open parentheses is displayed in the left box underneath the base change option set.
LOGICAL FUNCTIONS
-----------------
There is a set of logical functions which can be used between two operands. They can be used as normal arithmetic operators.
The only exception is the "Not" operator which works on a single number.
The provided functions are:
[And]
It executes an "and" between the numbers.
[Or]
It executes an "or" between the numbers.
[Xor]
It executes an "exclusive or" between the numbers.
[Not]
It inverts all bits of the number shown into the output display.
ALGEBRAIC FUNCTIONS
-------------------
ReactOS Calc implements the most commonly used algebraic functions.
[Int]
It isolates the integer part of the number shown into the output display.
[Inv]+[Int]
The integer part of the number is discarded and the fractional part stays on the output display.
[x^2]
Square function. It calculates the square of the number shown on the output display.
[Inv]+[x^2]
It returns the positive square root of the number shown on the output display.
If the current number is negative, then the error message will be displayed.
When working with standard and conversion layouts, the [sqrt] button is a shortcut to this function.
[x^3]
Cube function. It calculates the cube of the number shown on the output display.
[Inv]+[x^3]
It returns the cube root of the number shown on the output display.
[x^y]
Power function. It calculates the power of X elevated to Y.
[Inv]+[x^y]
Root function. It calculates the Y-th root of X.
[1/x]
Reciprocal. It divides 1 by the number shown on the output display.
[n!]
Factorial. It calculates the factorial of the integer part of the number shown into the output display.
The calculation is defined within these limits:
0 <= n <= 170
[ln]
Natural logarithm. It calculates the natural logarithm of the current number.
ReactOS Calc assumes the Nepero's constant to be:
e=2.7182818284590452354
The calculation is defined for x > 0.
[Inv]+[ln]
Natural anti-logarithm. It calculates the power of the Nepero's constant to the current number.
[Log]
Decimal logarithm. It calculates the logarithm of the current number to base 10.
The calculation is defined for x > 0.
[Inv]+[Log]
Decimal anti-logarithm. It calculates the power of 10 to the current number.
TRIGONOMETRIC FUNCTIONS
-----------------------
ReactOS Calc allows the calculation of three types of trigonometric functions with their inverse operations.
These functions can be used with three different angular units of measurement: degrees, radians or gradians.
The angular mode does not affect the non trigonometric functions.
Please note that the degree type uses decimal degrees and not angles in the degree-minute-second form.
The available functions are:
[sin]
It calculates the sine of the given angle.
If the [Inv] modifier is activated, it finds the angle whose sine value is shown into the output display.
[cos]
It calculates the cosine of the given angle.
If the [Inv] modifier is activated, it finds the angle whose cosine value is shown into the output display.
[tan]
It calculates the tangent of the given angle.
If the [Inv] modifier is activated, it finds the angle whose tangent value is shown into the output display.
THE PI BUTTON
-------------
For helping the calculations with trigonometric functions, it's possible to load the value of 'Pi' into the output display.
The function is called by pressing the [PI] button.
If the [Inv] modifier is activated, then the output display will be loaded with 2*PI.
In ReactOS Calc, Pi has the value 3.14159265358979323846
HYPERBOLIC FUNCTIONS
--------------------
ReactOS Calc allows the calculation of three types of hyperbolic functions with their inverse operations.
Those functions are activated by the same buttons used for trigonometric functions; the hyperbolic context is enabled by activating the [Hyp] modifier. The inverse functions are activated by the [Inv] modifier.
[sin]+[Hyp]
Hyperbolic sine
[cos]+[Hyp]
Hyperbolic cosine
[tan]+[Hyp]
Hyperbolic tangent
STATISTICAL FUNCTIONS
---------------------
By pressing the [STA] button, the statistical window is enabled.
Statistical window allows to store groups of number and execute some common statistical operators.
Into the statistical box, there are four buttons with these functions:
[RET]
It moves the focus back to the calculator.
[LOAD]
It loads the selected number into the output display of the calculator.
[CD]
It deletes the selected number from the list.
[CAD]
It deletes all numbers currently stored into the list.
While the statistical window is shown, four additional buttons are enabled:
[Ave]
It calculates the arithmetic average of the numbers stored into the list.
[Ave] + [Inv]
It calculates the arithmetic average of the squares of the numbers stored into the list.
[Sum]
It calculates the sum of all numbers stored into the list.
[Sum] + [Inv]
It calculates the sum of the squares of all numbers stored into the list.
[s]
It calculates the population standard deviations with base 'n-1' of the numbers stored into the list.
[s] + [Inv]
It calculates the population standard deviations with base 'n' of the numbers stored into the list.
[Dat]
It inserts the number shown into the output display into the list.
Note: when the statistical box is closed, its content is lost.
MEMORY FUNCTION
---------------
ReactOS Calc reserves for the user a memory region for storing data.
With this feature, the user can store frequently used numbers (typically, these numbers are constants) and recall them at any time, without the need to re-enter them manually.
If the memory function is currently in use, the text "M" will appear in the right box underneath the base change option set.
The memory is preserved when switching between standard, conversion and scientific modes, but its content is lost when ReactOS Calc application is closed.
Four keys are available with memory function support.
[MC]
Memory Clear: clears the content of the memory.
[MR]
Memory Recall: retrieves the stored data from the memory and it shows it into the output display, without affecting the content of the storage.
[MS]
Memory Store: stores the displayed value into the memory. The content of the display is unaffected. After pressing this button, the previous content of the memory is lost. If the [INV] modifier is activated, then this button will swap current memory value with displayed value. Under these conditions, the displayed value is stored and the previously stored quantity is shown on the output display.
If the memory is empty, it will act as a normal store.
[M+]
Memory Sum: the displayed value is algebraically added to the current memory. The output display will be unchanged after this transfer and addition. If the [INV] modifier is activated, then the displayed value will be algebraically subtracted from the memory. If the memory is empty, it will work in both condition as a simple memory store.
DEGREE CONVERSION
-----------------
With [dms] button you can convert decimal degrees into degree-minute-second format and vice-versa.
When working with d-m-s angles, the notation used into the output display is "DDD.MMSS" where D stands for degree, M for minute and S for second.
The [dms] button will convert decimal angles to degree-minute-second angles.
The [dms] button with [Inv] modifier will convert degree-minute-second angles into decimal angles.
FIXED SCIENTIFIC NOTATION
-------------------------
When working with ReactOS Calc, it is possible to select a temporary scientific notation (activated by [Exp] button) or a fixed scientific notation.
Fixed scientific notation will be turned on by pressing [F-E] button.
When fixed scientific notation is active, all results will be displayed with scientific notation even for small numbers.
The calculator will be restored to normal mode by pressing [F-E] button again or by pressing the [ C ] button.
PERCENT
-------
The [%] button is available only with standard and conversion layouts and it's used as modifier for the four basic arithmetic operators.
The input sequence for a percent calculation is:
"first" "operator" "second" "percent"
The modification applied by the percent button for each operator are:
[+]
Add "second"-% of "first" to "first".
[-]
Subtract "second"-% of "first" from "first".
[*]
Multiply "second"-% of "first" with "first".
[/]
Divide "first" by "second"-% of "first".
GLOSSARY
--------
Output display
This is the place where the typed numbers and the results of the calculations are shown.
Hex
It selects the hexadecimal numeric base and it converts the number shown into the output display.
Shortcut from keyboard: F5
Dec
It selects the decimal numeric base and it converts the number shown into the output display.
Shortcut from keyboard: F6
Oct
It selects the octal numeric base and it converts the number shown into the output display.
Shortcut from keyboard: F7
Bin
It selects the binary numeric base and it converts the number shown into the output display.
Shortcut from keyboard: F8
Degrees
It enables the processing of trigonometric functions into degree format.
Shortcut from keyboard: F2
Radians
It enables the processing of trigonometric functions into radians format.
Shortcut from keyboard: F3
Gradians
It enables the processing of trigonometric functions into gradians format.
Shortcut from keyboard: F4
Qword
It limits the length of integer numbers to 64 bits.
Shortcut from keyboard: F12
Dword
It limits the length of integer numbers to 32 bits.
Shortcut from keyboard: F2
Word
It limits the length of integer numbers to 16 bits.
Shortcut from keyboard: F3
Byte
It limits the length of integer numbers to 8 bits.
Shortcut from keyboard: F4
Inv
It enables the inverse function for [sin] [cos] [tan] [pi] [x^y] [x^2] [x^3] [ln] [log] [dms] [MS] [M+] [Int] buttons.
Shortcut from keyboard: I
Hyp
It enables the hyperbolic mode for [sin] [cos] [tan] buttons
Shortcut from keyboard: H
Back
It deletes the last digit typed on the calculator.
It also disables the temporary scientific mode if an exponent is removed completely.
Shortcut from keyboard: Backspace
CE
It deletes the last typed number from the output display.
Shortcut from keyboard: Delete
_C_
It deletes the current calculation and all sub expressions.
Shortcut from keyboard: ESC
F-E
It enables or it disables the fixed scientific notation.
Shortcut from keyboard: V
0 1 2 3 4 5 6 7 8 9
These buttons are used for entering digits.
Shortcut from keyboard: the corresponding number on the keyboard or the numeric pad.
A B C D E F
These buttons are used for entering hexadecimal numbers.
Shortcut from keyboard: the letters from A to F.
+/-
It changes the sign of the number.
Shortcut from keyboard: F9
. or ,
It adds the decimal point for a decimal number.
Shortcut from keyboard: , or .
+
Addition
Shortcut from keyboard: +
-
Subtraction
Shortcut from keyboard: -
*
Multiplication
Shortcut from keyboard: *
/
Division
Shortcut from keyboard: /
=
It resolves the current calculation and all sub expressions.
Shortcut from keyboard: =
Mod
Remainder of an integer division.
Shortcut from keyboard: %
And
Logical "and".
Shortcut from keyboard: &
Or
Logical "or".
Shortcut from keyboard: |
Xor
Logical exclusive "or".
Shortcut from keyboard: ^
Lsh
Logical shift to left.
Shortcut from keyboard: <
Not
Logical bit inversion.
Shortcut from keyboard: ~
Int
It isolates the Integer or fractional part of a number.
Shortcut from keyboard: ;
MC
It deletes the memory.
Shortcut from keyboard: CTRL-L
MR
It recalls a previously stored number from the memory.
Shortcut from keyboard: CTRL-R
MS
It stores a number into the memory and it eventually transfers the previous value to the output display.
Shortcut from keyboard: CTRL-M
M+
It adds or it subtracts the value into the output display to the memory.
Shortcut from keyboard: CTRL-P
pi
It loads the pi or 2*pi value into the output display.
Shortcut from keyboard: P
(
It starts a new sub expression.
Shortcut from keyboard: (
)
It closes and it resolves a sub expression.
Shortcut from keyboard: )
dms
It converts a decimal degree to a decimal-minute-second degree and viceversa.
Shortcut from keyboard: M
Exp
It enables the temporary scientific notation.
Shortcut from keyboard: X
ln
It calculates the natural logarithm. Natural anti logarithm calculation is activated by Inv modifier.
Shortcut from keyboard: N
Log
It calculates the decimal logarithm. Decimal anti logarithm calculation is activated by Inv modifier.
Shortcut from keyboard: L
n!
It calculates the factorial of a number.
Shortcut from keyboard: !
1/x
It calculates the reciprocal of a number.
Shortcut from keyboard: R
sin
It calculates the sine, hyperbolic sine, arcsine or the hyperbolic arcsine of an angle.
Shortcut from keyboard: S
cos
It calculates the cosine, hyperbolic cosine, arcsine or the hyperbolic arccosine of an angle.
Shortcut from keyboard: O
tan
It calculates the tangent, hyperbolic tangent, arcstangent or the hyperbolic arctangent of an angle.
Shortcut from keyboard: T
x^y
It calculates the power of X to Y.
With the Inv modifier, it calculates the Yth root of X.
Shortcut from keyboard: Y
x^2
It calculates the square of X.
With the Inv modifier, it calculates the square root of X.
Shortcut from keyboard: @
x^3
It calculates the cube of X.
With the Inv modifier, it calculates the cubic root of X.
Shortcut from keyboard: $
Sta
It enables the statistical window and its functions.
Shortcut from keyboard: CTRL-S
Ave
It calculates the arithmetic average of the numbers stored into the statistical box.
When used with [Inv] modifier it calculates the average of squares.
Shortcut from keyboard: CTRL-A
Sum
It calculates the sum of the numbers stored into the statistical box.
When used with [Inv] modifier it calculates the summation of squares.
Shortcut from keyboard: CTRL-T
s
It calculates the standard deviation of the numbers stores into the statistical box.
Shortcut from keyboard: CTRL-D
Dat
It inserts a new number into the statistical box
Shortcut from keyboard: Insert
%
It executes the calculation with percent mode.
Shortcut from keyboard: %
sqrt
It calculates the square root of a number.
Shortcut from keyboard: @