3.2. To Perform Basic Calculations

Basic Mode is displayed by default when you first start gcalctool. To explicitly invoke Basic Mode, choose View->Basic Mode.

3.2.1. To Perform Simple Calculations

To perform simple calculations, use the buttons described in Table 1.

Table 1. Performing Simple Calculations

Function

Button

Description

Example

Result

Numerals

0 to 9 inclusive

In decimal and hexadecimal base, all numerals are available. In octal base, 8 and 9 are unavailable. In binary base, only 0 and 1 are available. The default base is decimal.

1

1

Numeric point

.

Starts the fractional part of a numeric entry.

1 . 2

1.2

Calculate a result

=

Displays the result of the current calculation in the current base.

1 + 2 =

3

Addition

+

Adds the current value in the display area to the next number that you enter.

1 + 2 =

3

Subtraction

-

Subtracts from the current value in the display area the next number that you enter.

3 - 2 =

1

Multiplication

*

Multiplies the current value in the display area by the next number that you enter.

3 * 2 =

6

Division

/

Divides the current value in the display area by the next number that you enter.

6 / 3 =

2

3.2.2. To Erase Characters

To erase characters, use the buttons described in Table 2.

Table 2. Erasing Characters

Function

Button

Description

Example

Result

Backspace

Bsp

Removes the rightmost character from the display area.

1 + 22 Bsp =

3

Clear Entry

CE

Removes the current value from the display area.

1 + 22 CE =

1

Clear

Clr

Resets the current value in the display area to zero. Clr also deselects the Hyp and Inv options in Scientific Mode.

1 + 22 Clr =

0

3.2.3. To Perform Arithmetic Calculations

To perform arithmetic calculations, use the buttons described in Table 3.

Table 3. Performing Arithmetic Calculations

Function

Button

Description

Example

Result

Percentage

%

Uses the next number that you enter to calculate that percentage of the current value in the display area.

200 % 2 =

4

Reciprocal

1/x

Divides 1 by the current value in the display area.

4 1/x

0.25

Change the arithmetic sign

+/-

Changes a positive number to a negative number, or a negative number to a positive number.

8 +/-

-8

Square Root

Sqrt

Calculates the square root of the current value in the display area.

9 Sqrt

3

Square

x2

Calculates the square of the current value in the display area.

3 x2

9

Integer Portion

Int

Calculates the integer portion of the current value in the display area.

-23.45 Int

-23

Fractional Portion

Frac

Calculates the fractional portion of the current value in the display area.

-23.45 Frac

-0.45

Absolute Value

Abs

Calculates the absolute value of the current value in the display area.

-23.45 Abs

23.45

3.2.4. To Use the Calculator Memory Registers

You can store values in any of the ten gcalctool memory registers R0 to R9. To display the memory registers, choose View->Memory Registers.

Table 4 describes the memory functions that you can use.

Table 4. Memory Functions

Function

Button

Description

Example

Result

Store Value in Memory Register

Sto

Stores the current contents of the display area in the specified memory register. Click on Sto, and select a memory register from the popup menu.

To clear a memory register during a gcalctool session:

  1. Click Clr.

  2. Click on Sto.

  3. Select the memory register from the popup menu.

22 Sto R2

The value 22 is stored in memory register R2

Retrieve Value From Memory Register

Rcl

Retrieves the contents of the specified memory register. Click on Rcl, and select the memory register from the popup menu.

0 Rcl R2

22

where 22 is the value previously stored in memory register R2

Exchange Memory Register Value and Displayed Value

Exch

Exchanges the contents of the specified memory register and the current value in the display area. Click on Exch, and select the memory register from the popup menu.

44 Exch R2

Value in display area changes from 44 to 22, value in R2 changes from 22 to 44

where 22 is the value previously stored in memory register R2

If you use keyboard shortcuts, you can use the keyboard to specify the memory register, as shown in the following examples:

Keyboard Entry

Description

S 2

Stores the current contents of the display area in memory register R2.

R 2

Retrieves the current contents of memory register R2 into the display area.

X 2

Exchanges the current value of the display area with the contents of memory register R2.

3.2.5. To Display ASCII Values

To display the ASCII value of a character, choose Edit->Insert ASCII Value.

The Insert ASCII Value dialog is displayed.

Enter the required character in the Character field, and click on Insert. The ASCII value of that character, in the current numeric base, appears in the display area. For example, the ASCII value of B in decimal base is 66.


Previous
To Use Calculator Functions
Contents Next
To Perform Financial Calculations

About GNOME · Download · Users · Documentation · Developers · Foundation · Contact