New calculator for ReactOS

All development related issues welcome

Moderator: Moderator Team

Carlo Bramix
Posts: 282
Joined: Thu Jan 04, 2007 12:43 am
Location: Italy

Post by Carlo Bramix »

mvent2 wrote:I reckon you should use context-sensitive tooltips (click the ? button in the titlebar on Windows to get a cursor like this: ^? then click on anything to get a yellow box saying what it does) as well as a brief help file. That way, you can go into detail about what each button does, and the users can find out only what they want to find out.
You can already do it with Microsoft Calculator, by activating the context help.
Go on your button with mouse cursor, right-click and select "Quick Help" and you will get the explanation you were searching.
ReactOS Calc has the context help function too, but help file is missing.
Personally, I find more pratical the context menu instead of selecting the tooltip help every time you want to know a specific function.

Sincerely,

Carlo Bramini

Carlo Bramix
Posts: 282
Joined: Thu Jan 04, 2007 12:43 am
Location: Italy

Post by Carlo Bramix »

Haos wrote:Could you consider adding several number "caches"? In windows calc it always bothered me that i can only save one number in system clipboard. Whenever i needed to save several numbers, i had to use excell sheet.
You can do it with STA function.
Click on STA to enable the function.
Digit a number on the calculator and press INSERT key or push on DAT button.
When you want to recall a saved number, select it into the statistic window and push on LOAD button.
Or, more quickly, just double-click on the number you want to load.
I just discovered that I was not catching double click events on statistic window.
Now it has been fixed.

Sincerely,

Carlo Bramini.

Carlo Bramix
Posts: 282
Joined: Thu Jan 04, 2007 12:43 am
Location: Italy

Post by Carlo Bramix »

ReactOS Calc 1.03 has been released.
It fixes few things...

Sincerely,

Carlo Bramini

mvent2
Posts: 46
Joined: Sun Jul 30, 2006 1:59 pm

Post by mvent2 »

Its Bug Report time :D

I tend to press +/- before I type in any numbers, out of habit. This doesn't work on either Windows or ReactOS calculator. So I press +/- while there is still 0 in the calculator. When I do that on ReactOS calculator, a 0 stays out the front when I start entering the numbers.

To reproduce:
Press +/- while there is only 0 in the calculator.
Type 123.
You get 0123.

Also, I can type in as many prefixed 0s as I want, so I could type a number like 0000000 in ReactOS calculator, but Windows calculator prevents that and keeps it at a single 0 no matter how many times I press the 0 button.

To reproduce:
Keep pressing 0 many times while there is only 0 in the calculator.
You get 00000000.

Carlo Bramix
Posts: 282
Joined: Thu Jan 04, 2007 12:43 am
Location: Italy

Post by Carlo Bramix »

mvent2 wrote:Its Bug Report time :D

I tend to press +/- before I type in any numbers, out of habit. This doesn't work on either Windows or ReactOS calculator. So I press +/- while there is still 0 in the calculator. When I do that on ReactOS calculator, a 0 stays out the front when I start entering the numbers.

To reproduce:
Press +/- while there is only 0 in the calculator.
Type 123.
You get 0123.

Also, I can type in as many prefixed 0s as I want, so I could type a number like 0000000 in ReactOS calculator, but Windows calculator prevents that and keeps it at a single 0 no matter how many times I press the 0 button.

To reproduce:
Keep pressing 0 many times while there is only 0 in the calculator.
You get 00000000.
Fixed.
Thank you for your report.

Sincerely,

Carlo Bramini

counting_pine
Posts: 237
Joined: Fri Nov 26, 2004 10:44 pm
Location: Fallowfield

Post by counting_pine »

Hi. Not totally connected with this project, but thought I'd mention, I found this today:
http://www.microsoft.com/globaldev/outr ... cplus.mspx
The new default theme is horrible, but it adds a new mode, that lets you convert between variables.

Carlo Bramix
Posts: 282
Joined: Thu Jan 04, 2007 12:43 am
Location: Italy

Post by Carlo Bramix »

counting_pine wrote:Hi. Not totally connected with this project, but thought I'd mention, I found this today:
http://www.microsoft.com/globaldev/outr ... cplus.mspx
The new default theme is horrible, but it adds a new mode, that lets you convert between variables.
I saw that new horrible layout too.
If I will add it and I can choose how to make it, I don't like the idea of making a new layout only for making variables conversions.
Instead, I prefer to do a child window like it has been done with statistical calculations.
It will work with both standard and scientific functions and it will be surely easier to maintain.

Sincerely,

Carlo Bramini

Carlo Bramix
Posts: 282
Joined: Thu Jan 04, 2007 12:43 am
Location: Italy

Post by Carlo Bramix »

Hello,
I wrote the help file for ReactOS Calc.
I'm wondering if some english native speakers could do a quick read to the manual for checking some syntax/grammar errors before releasing a new bug-fixed version of this programme.

Thanks in advance for your help!

Sincerely,

Carlo Bramini

Code: Select all

ReactOS Calc is an instrument for executing mathematical, financial and statistical calculations.
This help will describe its capabilities and you will learn how to use them effectively.

ReactOS Calc has several features including:
- Internal precision with 17 decimal numbers.
- Robust RPN (reverse polish notation) engine which allows a virtually unlimited number of arithmetic and algebraic sub-expressions.
- It can run with two different interfaces: standard or scientific.
- Many common arithmetic, algebraic and statistical functions are included.

HOW TO INPUT NUMBERS
--------------------
The ReactOS Calc provides some buttons for typing numbers and expressions.
However, some of them are available only into Standard 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, it's possible correct it by deleteting the last digit by pressing this button.
[CE]
This button removes an incorrect number from the output display. All pending calculations are preserved.
[ C ]
It clears the output display and all pending operations.

DISPLAY FORMAT
--------------
The user can type the numbers by pressing the buttons into 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 to write very big or very small numbers that you won't probably 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 is activated by the [Exp] button.
After the mantissa has been typed, by pressing [Exp] you will be able to enter the exponent.

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 by the [ C ] button.

ARITHMETIC FUNCTIONS
--------------------
ReactOS Calc implements the standard arithmetic rules with the following operators:
[+]
Addition
[-]
Subtraction
[*]
Multiplication
[/]
Division
[Mod]
Remainder
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.

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 layout, 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 natural logarithm of the current number.
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 measurement: degrees, radians or gradians.
The angular mode doesn't 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 pi-greco into the output display.
If the [Inv] modifier is acivated, then the output display will be loaded with 2*PI.

HYPERBOLIC FUNCTIONS
--------------------
ReactOS Calc allows the calculation of three types of hyperbolic functions with their inverse operations.
Those function 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.
[Sum]
It calculates the sum of all numbers stored into the list.
[s]
It calculates the population standard deviations 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 into the memory control.
The memory is preserved when switching between standard and scientific mode, 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 viceversa.
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 ans 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 mode 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" to "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 lenght of integer numbers to 64 bits.
Shortcut from keyboard: F12

Dword
It limits the lenght of integer numbers to 32 bits.
Shortcut from keyboard: F2

Word
It limits the lenght of integer numbers to 16 bits.
Shortcut from keyboard: F3

Byte
It limits the lenght 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 number 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 scietific notation.
Shortcut from keyboard: V

0 1 2 3 4 5 6 7 8 9
These buttons are used for introducing the numbers.
Shortcut from keyboard: the corresponding number on the keyboard or the numeric pad.

A B C D E F
These buttons are used for introducing the 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.
Shortcut from keyboard: CTRL-A

Sum
It calculates the sum of the numbers stored into the statistical box.
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: @

chrisv5
Posts: 32
Joined: Tue Jan 09, 2007 1:46 am

Post by chrisv5 »

Version 1.03 still shows "gradients" and "radiants" both next to the radio button as well as in the menu :-)

While it is definitely "Radian", you can call the other beast either Grad, Grade, Gon or Gradian (according to the Wikipedia)

Reacter
Posts: 326
Joined: Tue Feb 06, 2007 9:57 pm
Location: Tornado Alley

Post by Reacter »

Nice long list of functions there, Bramix. I could use some of those...
More ReactOS, please!

mvent2
Posts: 46
Joined: Sun Jul 30, 2006 1:59 pm

Post by mvent2 »

Carlo Bramix wrote:Hello,
I wrote the help file for ReactOS Calc.
I'm wondering if some english native speakers could do a quick read to the manual for checking some syntax/grammar errors before releasing a new bug-fixed version of this programme.

Thanks in advance for your help!

Sincerely,

Carlo Bramini
Allow me :D
Changes in bold. They were mostly typos though, this is a good help file.
ReactOS Calc is a program for evaluating mathematical, financial and statistical calculations.
(remove the "This help file..." line)

ReactOS Calc has several features including:
- Internal precision with 17 decimal numbers.
- Robust RPN (reverse polish notation) engine which allows a virtually unlimited number of arithmetic and algebraic sub-expressions.
- two different interfaces: standard or scientific.
- Many common arithmetic, algebraic and statistical functions are included.

HOW TO INPUT NUMBERS
--------------------
The ReactOS Calc provides some buttons for typing numbers and expressions.
However, some of them are available only into Standard 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], , [C], [D], [E], [F]
Hexadecimal buttons: they are used for completing a 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 is activated by the [Exp] button.
After the mantissa has been typed, by pressing [Exp] you will be able to enter the exponent.

When the calculator is in [HEX], [OCT] or [BIN] mode, 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
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 layout, 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 natural 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 pi-greco into the output display.
If the [Inv] modifier is acivated, then the output display will be loaded with 2*PI.
In ReactOS Calc, Pi has the value 3.141592... (to whatever ReactOS Calc returns Pi as)

HYPERBOLIC FUNCTIONS
--------------------
ReactOS Calc allows the calculation of three types of hyperbolic functions with their inverse operations.
Those function 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.
[Sum]
It calculates the sum of all numbers stored into the list.
[s]
It calculates the population standard deviations 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 and scientific mode, 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 mode 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 scietific 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.
Shortcut from keyboard: CTRL-A

Sum
It calculates the sum of the numbers stored into the statistical box.
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: @
I can't wait for the next release! :)

Carlo Bramix
Posts: 282
Joined: Thu Jan 04, 2007 12:43 am
Location: Italy

Post by Carlo Bramix »

Thank you, I'm going to release a new version in few hours.

Sincerely,

Carlo Bramini.

Carlo Bramix
Posts: 282
Joined: Thu Jan 04, 2007 12:43 am
Location: Italy

Post by Carlo Bramix »

ReactOS Calc 1.04 has been released.
It's available at the usual address.

Sincerely,

Carlo Bramini.

ROSFan
Posts: 268
Joined: Thu Apr 06, 2006 2:09 pm
Location: Germany

Post by ROSFan »

Wow, good work!

What i miss is higher precision. I often need to calculate something like log(8192!)/log(2) (it means: 8192 n! log / 2 log)
Windows calc is the only prog I know which can do that.

mvent2
Posts: 46
Joined: Sun Jul 30, 2006 1:59 pm

Post by mvent2 »

Heheh, I was just randomly pressing buttons like a wierdo and found another bug. :lol:

With only 0 in the calculator, press the decimal point (. or ,) then +/-. Then type in some numbers. The 0 stays out in front.

If you do the same thing with any other number in the calculator instead of 0, the sign will change but there will be no decimal point.

Windows calculator remembers the decimal point and switches the sign.

Great work though. Hopefully this will be integrated into ROS soon. :)

EDIT: I can divide by 0. It will always return 1. Was this on purpose to stop a "divide by 0" crash? A message makes more sense (Windows calc displays "Cannot divide by zero.")

Locked

Who is online

Users browsing this forum: Semrush [Bot] and 1 guest