# gcalctool Manual

gcalctool is a calculator for GNOME. It includes basic, advanced, financial, and scientific modes and uses a multiple precision package to do its arithmetic to give a high degree of accuracy.

2003
2004
2005
Sun Microsystems
2006, 2007
Daniel Nylander (po@danielnylander.se)
Dokumentationsprojekt för GNOME

Tillstånd att kopiera, distribuera och/eller modifiera detta dokument ges under villkoren i GNU Free Documentation License (GFDL), version 1.1 eller senare, utgivet av Free Software Foundation utan standardavsnitt och omslagstexter. En kopia av GFDL finns att hämta på denna länk eller i filen COPYING-DOCS som medföljer denna handbok.

Denna handbok utgör en av flera GNOME-handböcker som distribueras under villkoren i GFDL. Om du vill distribuera denna handbok separat från övriga handböcker kan du göra detta genom att lägga till en kopia av licensavtalet i handboken enligt instruktionerna i avsnitt 6 i licensavtalet.

Flera namn på produkter och tjänster är registrerade varumärken. I de fall dessa namn förekommer i GNOME-dokumentation - och medlemmarna i GNOME-dokumentationsprojektet är medvetna om dessa varumärken - är de skrivna med versaler eller med inledande versal.

DOKUMENTET OCH MODIFIERADE VERSIONER AV DOKUMENTET TILLHANDAHÅLLS UNDER VILLKOREN I GNU FREE DOCUMENTATION LICENSE ENDAST UNDER FÖLJANDE FÖRUTSÄTTNINGAR:

1. DOKUMENTET TILLHANDAHÅLLS I "BEFINTLIGT SKICK" UTAN NÅGRA SOM HELST GARANTIER, VARE SIG UTTRYCKLIGA ELLER UNDERFÖRSTÅDDA, INKLUSIVE, MEN INTE BEGRÄNSAT TILL, GARANTIER ATT DOKUMENTET ELLER EN MODIFIERAD VERSION AV DOKUMENTET INTE INNEHÅLLER NÅGRA FELAKTIGHETER, ÄR LÄMPLIGT FÖR ETT VISST ÄNDAMÅL ELLER INTE STRIDER MOT LAG. HELA RISKEN VAD GÄLLER KVALITET, EXAKTHET OCH UTFÖRANDE AV DOKUMENTET OCH MODIFIERADE VERSIONER AV DOKUMENTET LIGGER HELT OCH HÅLLET PÅ ANVÄNDAREN. OM ETT DOKUMENT ELLER EN MODIFIERAD VERSION AV ETT DOKUMENT SKULLE VISA SIG INNEHÅLLA FELAKTIGHETER I NÅGOT HÄNSEENDE ÄR DET DU (INTE DEN URSPRUNGLIGA SKRIBENTEN, FÖRFATTAREN ELLER NÅGON ANNAN MEDARBETARE) SOM FÅR STÅ FÖR ALLA EVENTUELLA KOSTNADER FÖR SERVICE, REPARATIONER ELLER KORRIGERINGAR. DENNA GARANTIFRISKRIVNING UTGÖR EN VÄSENTLIG DEL AV DETTA LICENSAVTAL. DETTA INNEBÄR ATT ALL ANVÄNDNING AV ETT DOKUMENT ELLER EN MODIFIERAD VERSION AV ETT DOKUMENT BEVILJAS ENDAST UNDER DENNA ANSVARSFRISKRIVNING;

2. UNDER INGA OMSTÄNDIGHETER ELLER INOM RAMEN FÖR NÅGON LAGSTIFTNING, OAVSETT OM DET GÄLLER KRÄNKNING (INKLUSIVE VÅRDSLÖSHET), KONTRAKT ELLER DYLIKT, SKA FÖRFATTAREN, DEN URSPRUNGLIGA SKRIBENTEN ELLER ANNAN MEDARBETARE ELLER ÅTERFÖRSÄLJARE AV DOKUMENTET ELLER AV EN MODIFIERAD VERSION AV DOKUMENTET ELLER NÅGON LEVERANTÖR TILL NÅGON AV NÄMNDA PARTER STÄLLAS ANSVARIG GENTEMOT NÅGON FÖR NÅGRA DIREKTA, INDIREKTA, SÄRSKILDA ELLER OFÖRUTSEDDA SKADOR ELLER FÖLJDSKADOR AV NÅGOT SLAG, INKLUSIVE, MEN INTE BEGRÄNSAT TILL, SKADOR BETRÄFFANDE FÖRLORAD GOODWILL, HINDER I ARBETET, DATORHAVERI ELLER NÅGRA ANDRA TÄNKBARA SKADOR ELLER FÖRLUSTER SOM KAN UPPKOMMA PÅ GRUND AV ELLER RELATERAT TILL ANVÄNDNINGEN AV DOKUMENTET ELLER MODIFIERADE VERSIONER AV DOKUMENTET, ÄVEN OM PART SKA HA BLIVIT INFORMERAD OM MÖJLIGHETEN TILL SÅDANA SKADOR.

Sun Microsystems Inc.
Handbok för Miniräknare v2.9
Mars 2005

Sun Java Desktop System Documentation Team

Dokumentationsprojekt för GNOME

Handbok för Miniräknare v2.8
Augusti 2004

Sun Java Desktop System Documentation Team

Dokumentationsprojekt för GNOME

Handbok för gcalctool v2.7
Februari 2004

Suns GNOME-dokumentationsteam

Dokumentationsprojekt för GNOME

Handbok för gcalctool v2.6
Oktober 2003

Suns GNOME-dokumentationsteam

Dokumentationsprojekt för GNOME

Handbok för gcalctool v2.5
Juli 2003

Suns GNOME-dokumentationsteam

Dokumentationsprojekt för GNOME

Handbok för gcalctool v2.4
Juni 2003

Suns GNOME-dokumentationsteam

Dokumentationsprojekt för GNOME

Handbok för gcalctool v2.3
April 2003

Suns GNOME-dokumentationsteam

Dokumentationsprojekt för GNOME

Handbok för gcalctool v2.2
April 2003

Suns GNOME-dokumentationsteam

Dokumentationsprojekt för GNOME

Handbok för gcalctool v2.1
Mars 2003

Suns GNOME-dokumentationsteam

Dokumentationsprojekt för GNOME

Handbok för gcalctool v2.0
Mars 2003

Suns GNOME-dokumentationsteam

Dokumentationsprojekt för GNOME

Denna handbok beskriver version 5.5.37 av Miniräknare.

## Återkoppling

To report a bug or make a suggestion regarding the gcalctool application or this manual, follow the directions in the GNOME Feedback Page.

## Introduktion

The gcalctool application provides the following modes for different types of mathematical functionality:

Grundläggande

  The default mode. Provides standard calculator functions. You can perform standard addition, subtraction, division, and multiplication functions in Basic mode and you can use all of the Basic functions in each of the other modes.

Avancerat

  Provides advanced calculator functions. You can store numbers in 10 different memory registers, and easily retrieve and replace the numbers in the memory registers. You can use all of the Advanced functions in Financial and Scientific modes.

Ekonomi

  Tillhandahåller ett flertal komplexa ekonomiska räknefunktioner.

Vetenskapligt

  Provides many additional mathematical functions, including trigonometric and bitwise functions. You can also store your own functions and constants, when you use Scientific mode.

You can use gcalctool in the following numbering systems:

Numreringssystem | Bas
--- | ---
Binär | 2
Oktal | 8
Decimal | 10
Hexadecimal | 16

## Komma igång

You can start gcalctool in the following ways:

Meny

  Välj Tillbehör Miniräknare.

Kommandorad

  Kör följande kommando: `gnome-calculator`

When you start gcalctool, the following window is displayed:

### gcalctool Basic Mode Window

Shows gcalctool Basic mode window.

The gcalctool window contains the following elements:

Menyrad

  The menus on the menubar contain all of the commands that you need to work with gcalctool.

Display area

  The display area shows the numbers that you enter, and the results of calculations. If you are not using arithmetic precedence, you can only enter numbers of up to forty digits.

Mode area

  The mode area displays the buttons for the current mode. The Basic mode buttons are always displayed. Advanced mode buttons are also available in Financial and Scientific modes.

Popup Menu

  The Shows popup-menu symbol. symbol on a gcalctool button indicates that a popup menu is displayed when you click on that button.

Statusrad

  The status bar displays messages on the status of your calculations.

## Användning

### Använda miniräknarfunktioner

To perform a calculation, use one of the following methods:

- Click on the gcalctool buttons to enter numbers and functions.

- Give focus to the gcalctool window, then use the keyboard or numeric keypad to specify the calculation that you want to perform. For a complete list of keyboard shortcuts, see .

The gcalctool application automatically displays numbers with more than 40 digits, and small numbers, as exponential numbers. For example, the following table shows the value that is displayed when you use the decimal numeric base with an accuracy of 2 significant places:

Display | Signifies
--- | ---
1.23e+37 | 1.23 * 1037
1e-5 | 0.00001

For information about how to enter a number in exponential format, see .

#### To Display a Separator in Large Numbers

To insert a separator between every three digits to the left of the numeric point in decimal base, choose View Show Thousands Separator.

Different countries and cultures have varying conventions for how to communicate. These conventions include the language spoken and the character used as a numeric separator.

gcalctool has been internationalized so user's can adapt to their own conventions. This is done by setting a specific locale. We can't determine what locales will exist, except for a standard one called the C locale.

When you use the C locale, the separator character is not displayed.

#### To Copy and Paste in the Display Area

To copy the result of a calculation, choose Edit Copy. You can paste the value into another application.

To paste a previously copied value into the display area, choose Edit Paste.

### Genomföra grundläggande beräkningar

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

The calculator memory registers are unavailable in Basic Mode. In other words, View Memory Registers is inactive.

#### Genomföra enkla beräkningar

To perform simple calculations, use the buttons described in .

##### Genomföra enkla beräkningar

Funktion | Knapp | Beskrivning | Exempel | Resultat
--- | --- | --- | --- | ---
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
Beräkna ett resultat | = | 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
Subtraktion | - | Subtracts from the current value in the display area the next number that you enter. | 3 -2= | 1
Multiplikation | * | 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
Change the arithmetic sign | +/- | Changes a positive number to a negative number, or a negative number to a positive number. | 8 +/- | -8

#### Radera tecken

To erase characters, use the buttons described in .

##### Radera tecken

Funktion | Knapp | Beskrivning | Exempel | Resultat
--- | --- | --- | --- | ---
Backsteg | Bckstg | Removes the rightmost character from the display area. | 1 + 2 2 Bksp = | 3

Töm fält

CE

Removes the current value from the display area.

This is only really meaningful if the Calculator is not in Arithmetic Precedence mode.

In Arithmetic Precedence mode, this operation is the same as Clr

If the calculator is not in Arithmetic Precedence mode:

1 +2 2 CE=

If the calculator is in Arithmetic Precedence mode:

1 +2 2 CE=

If the calculator is not in Arithmetic Precedence mode:

1

If the calculator is in Arithmetic Precedence mode:

0

Töm | Töm | Resets the current value in the display area to zero and removes any previous calculation results. Clr also deselects the Hyp and Inv options in Scientific. | 1 +2 2 Töm | 0

#### Visa ASCII-värden

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, then click 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.

### Genomföra avancerade beräkningar

To change to Advanced mode, choose View Advanced .

When you change to Advanced mode, the following buttons are displayed to the right of the Basic mode buttons:

#### gcalctool Advanced Mode Buttons

Shows gcalctool Advanced mode buttons.

#### Genomföra avancerade beräkningar

Funktion | Knapp | Beskrivning | Exempel | Resultat
--- | --- | --- | --- | ---
Percentage | % | Divides the current value by 100. | 560 %= | 5.60
Reciprokt värde | 1/x | Divides 1 by the current value in the display area. | 4 1/x | 0.25
Kvadratrot | Rot | Calculates the square root of the current value in the display area. | For arithmetic precedence mode: Sqrt 9 )= For non-arithmetic precedence mode: 9 Rot | 3
Kvadrat | x2 | Calculates the square of the current value in the display area. | 3 x2 | 9
Heltalsdel | Heltal | Calculates the integer portion of the current value in the display area. | -23.45 Int | -23
Decimaldel | Bråk | Calculates the fractional portion of the current value in the display area. | -23.45 Bråk | -0.45
Absolutvärde | Abs | Calculates the absolute value of the current value in the display area. | -23.45 Abs | 23.45
Parentes | ( och ) | Provide precedence in arithmetic calculations if you are not using Arithmetic Precedence. See also . Calculations within parentheses are performed first. You can nest parentheses to any level. When the last parenthesis is matched, the display area is updated. | 2 +3*4= 2 +(3*4) | 20 14

#### Använda miniräknarens minnesregister

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

The memory registers can be dismissed by either choosing View Memory Registers again, or by clicking on the Close button in the memory register window.

beskriver minnesfunktionerna som du kan använda.

##### Minnesfunktioner

Funktion | Knapp | Beskrivning | Exempel | Resultat
--- | --- | --- | --- | ---

Lagra värde i minnesregister

Lagr

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

To clear a memory register during a gcalctool session:

1. Klicka på Töm.

2. Klicka på Lagr.

3. Select the memory register from the popup menu.

22 Lagr R2

Värdet 22 lagras i minnesregister R2.

Hämta värde från minnesregister | Hämt | Retrieves the contents of the specified memory register. Click Rcl, then select the memory register from the popup menu. | 0 Hämt R2 | The value in the display area is 22.
Exchange Memory Register Value and Displayed Value | Växla | Exchanges the contents of the specified memory register and the current value in the display area. Click Exch, then select the memory register from the popup menu. | 44 Exch R2 | The value in the display area changes from 44 to 22, the value in R2 changes from 22 to 44.

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

Keyboard Entry | Beskrivning
--- | ---
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.

### Genomför finansiella beräkningar

To change to Financial mode, choose View Financial .

When you change to Financial mode, the following buttons are displayed above the Basic and Advanced mode buttons:

#### gcalctool Financial Mode Buttons

Shows gcalctool Financial mode buttons.

För att genomföra finansiella beräkningar, använd knapparna som beskrivs i .

#### Performing Financial Calculations

Funktion | Knapp | Beskrivning | Exempel | Resultat
--- | --- | --- | --- | ---

Compounding Term

Ctrm

Calculates the number of compounding periods necessary to increase an investment of present value pv to a future value of fv, at a fixed interest rate of int per compounding period.

This function uses the following memory registers:

Register 0

  int, the periodic interest rate

Register 1

  fv, the future value

Register 2

  pv, the present value

You have just deposited $8000 in an account that pays an annual interest rate of 9%, compounded monthly. Given the annual interest rate, you determine that the simple monthly interest rate is 0.09 / 12 = 0.0075. To calculate the time period necessary to double your investment, put the following values into the first three memory registers:

Register 0

  0.0075

Register 1

  16000

Register 2

  8000

Click Ctrm =

92.77

The investment doubles in value in 92.77 months.

Double-Declining Depreciation

Ddb

Calculates the depreciation allowance on an asset for a specified period of time, using the double-declining balance method.

This function uses the following memory registers:

Register 0

  cost, the amount paid for the asset

Register 1

  salvage, the value of the asset at the end of its life

Register 2

  life, the useful life of the asset

Register 3

  period, the time period for depreciation allowance

You have just purchased an office machine for $8000. The useful life of this machine is six years. The salvage value after six years is $900. To calculate the depreciation expense for the fourth year, using the double-declining balance method, put the following values into the first four memory registers:

Register 0

  8000

Register 1

  900

Register 2

  6

Register 3

  4

Click Ddb =

790.12

The depreciation expense for the fourth year is $790.12.

Future Value

Fv

Calculates the future value of an investment based on a series of equal payments, each of amount pmt, at a periodic interest rate of int, over the number of payment periods in the term.

This function uses the following memory registers:

Register 0

  pmt, the periodic payment

Register 1

  int, the periodic interest rate

Register 2

  n, the number of periods

You plan to deposit $4000 in a bank account on the last day of each year for the next 20 years. The account pays 8% interest, compounded annually. Interest is paid on the last day of each year. To calculate the value of your account in 20 years, put the following values into the first three memory registers:

Register 0

  4000

Register 1

  0.08

Register 2

  20

Click Fv =

183047.86

At the end of 20 years, the value of the account is $183,047.86.

Periodic Payment

Pmt

Calculates the amount of the periodic payment of a loan, where payments are made at the end of each payment period.

This function uses the following memory registers:

Register 0

  prin, the principal

Register 1

  int, the periodic interest rate

Register 2

  n, the term

You are considering a $120,000 mortgage for 30 years at an annual interest rate of 11.0%. Given the annual interest rate, you determine that the simple monthly interest rate is 0.11 / 12 = 0.00917. The term is 30 * 12 = 360 months. To calculate the monthly repayment for this mortgage, put the following values into the first three memory registers:

Register 0

  120000

Register 1

  0.00917

Register 2

  360

Click Pmt =

1143.15

The monthly repayment is $1143.15.

Present Value

Pv

Calculates the present value of an investment based on a series of equal payments, each of amount pmt, discounted at a periodic interest rate of int, over the number of payment periods in the term.

This function uses the following memory registers:

Register 0

  pmt, the periodic payment

Register 1

  int, the periodic interest rate

Register 2

  n, the number of periods

You have just won a million dollars. The prize is awarded in 20 annual payments of $50,000 each. Annual payments are received at the end of each year. If you were to accept the annual payments of $50,000, you would invest the money at a rate of 9%, compounded annually.

However, you are given the option of receiving a single lump-sum payment of $400,000 instead of the million dollars annuity. To calculate which option is worth more in today's dollars, put the following values into the first three memory registers:

Register 0

  50000

Register 1

  0.09

Register 2

  20

Click Pv =

456427.28

The $1,000,000 paid over 20 years is worth $456,427.28 in present dollars.

Periodic Interest Rate

Rate

Calculates the periodic interest necessary to increase an investment of present value pv to a future value of fv, over the number of compounding periods in term.

This function uses the following memory registers:

Register 0

  fv, the future value

Register 1

  pv, the present value

Register 2

  n, the term

You have invested $20,000 in a bond. The bond matures in five years, and has a maturity value of $30,000. Interest is compounded monthly. The term is 5 * 12 = 60 months. To calculate the periodic interest rate for this investment, put the following values into the first three memory registers:

Register 0

  30000

Register 1

  20000

Register 2

  60

Click Rate =

.00678

The monthly interest rate is 0.678%. The annual interest rate is 0.678% * 12 = 8.14%.

Straight-Line Depreciation

Sln

Calculates the straight-line depreciation of an asset for one period. The depreciable cost is cost - salvage. The straight-line method of depreciation divides the depreciable cost evenly over the useful life of an asset. The useful life is the number of periods, typically years, over which an asset is depreciated.

This function uses the following memory registers:

Register 0

  cost, the amount paid for the asset

Register 1

  salvage, the value of the asset at the end of its life

Register 2

  life, the useful life of the asset

You have just purchased an office machine for $8000. The useful life of this machine is six years. The salvage value after six years is $900. To calculate the yearly depreciation expense, using the straight-line method, put the following values into the first three memory registers:

Register 0

  8000

Register 1

  900

Register 2

  6

Click Sln =

1183.33

The yearly depreciation expense is $1183.33.

Sum-Of-The-Years'-Digits Depreciation

Syd

Calculates the depreciation allowance on an asset for a specified period of time, using the Sum-Of-The-Years'-Digits method. This method of depreciation accelerates the rate of depreciation, so that more depreciation expense occurs in earlier periods than in later ones. The depreciable cost is cost - salvage. The useful life is the number of periods, typically years, over which an asset is depreciated.

This function uses the following memory registers:

Register 0

  cost, the amount paid for the asset

Register 1

  salvage, the value of the asset at the end of its life

Register 2

  life, the useful life of the asset

Register 3

  period, the time period for depreciation allowance

You have just purchased an office machine for $8000. The useful life of this machine is six years. The salvage value after six years is $900. To calculate the depreciation expense for the fourth year, using the sum-of-the-years'-digits method, put the following values into the first four memory registers:

Register 0

  8000

Register 1

  900

Register 2

  6

Register 3

  4

Click Syd =

1014.29

The depreciation expense for the fourth year is $1014.29.

Betalningsperiod

Term

Calculates the number of payment periods that are necessary during the term of an ordinary annuity, to accumulate a future value of fv, at a periodic interest rate of int. Each payment is equal to amount pmt.

This function uses the following memory registers:

Register 0

  pmt, the periodic payment

Register 1

  fv, the future value

Register 2

  int, the periodic interest rate

You plan to deposit $1800 in a bank account on the last day of each year. The account pays 11% interest, compounded annually. Interest is paid on the last day of each year. To calculate the time period necessary to accumulate $120,000, put the following values into the first three memory registers:

Register 0

  1800

Register 1

  120000

Register 2

  0.11

Click Term =

20.32

$120,000 accumulates in the account in 20.32 years.

### To Perform Scientific Calculations

To change to Scientific mode, choose View Scientific .

When you change to Scientific mode, the following buttons are displayed above the Basic and Advanced mode buttons:

#### gcalctool Scientific Mode Buttons

Shows gcalctool Scientific mode buttons.

#### To Set the Accuracy

To set the accuracy of the display area and of the memory registers, click Acc, then select from the popup menu the accuracy level that you require. The current accuracy level is indicated by a preceding black circle in the popup menu. Up to 99 significant places can be displayed. The default accuracy is 9 significant places.

To set the accuracy level above 9, select Other (9) ..., then choose the accuracy level you require in the Set Precision popup.

By default, trailing zeroes are not shown. To display trailing zeroes, click Acc then select Show Trailing Zeroes from the popup menu, or choose View Show Trailing Zeroes . A preceding check mark in the Acc popup menu or View menu indicates that the Show Trailing Zeroes option has been selected. To hide trailing zeroes, choose View Show Trailing Zeroes again.

The examples in the following table show how the accuracy setting affects x in the display area, when you use decimal base, with the Show Trailing Zeroes option selected, for the `1 / 8 = x` calculation:

Accuracy | Resultat
--- | ---
1 significant place | 1.2
2 significant places | 1.25
3 significant places | 1.250

#### To Set the Numeric Base

To set the numeric base, select one of the buttons described in .

##### Setting the Numeric Base

Funktion | Knapp | Beskrivning
--- | --- | ---
Binary Base | Bin | Sets the numeric base to binary, that is, base 2.
Octal Base | Okt | Sets the numeric base to octal, that is, base 8.
Decimal Base | Dec | Sets the numeric base to decimal, that is, base 10. Decimal is the default numeric base. If you change from Scientific mode to another mode, gcalctool automatically sets the numeric base to decimal.
Hexadecimal Base | Hex | Sets the numeric base to hexadecimal, that is, base 16.

#### To Set the Display Type

To set the display type, select one of the buttons described in .

##### Setting the Display Type

Funktion | Knapp | Beskrivning
--- | --- | ---
Engineering Display Type | Eng | Sets the display type to engineering format. Results are displayed in scientific notation. The exponent is always a multiple of three.
Fixed-Point Display Type | Fix | Sets the display type to fixed-point format. Results are not displayed in scientific notation. Fixed-point is the default display type. If you change from scientific mode to either basic mode or financial mode, gcalctool automatically sets the display type to fixed-point format.
Scientific Display Type | Sci | Sets the display type to scientific format. Results are displayed in scientific notation, with a fixed number of numeric digits.

#### To Set the Trigonometric Type

To set the trigonometric type, select one of the buttons described in .

##### Setting the Trigonometric Type

Funktion | Knapp | Beskrivning
--- | --- | ---
Grader | Grader | Sets the trigonometric type to degrees. Degrees is the default trigonometric type.
Gradians | Gradians | Sets the trigonometric type to gradians.
Radians | Radians | Sets the trigonometric type to radians.

#### To Set the Trigonometric Options

To set the trigonometric options, use the options described in .

##### Setting the Trigonometric Options

Funktion | Knapp | Beskrivning
--- | --- | ---
Hyperbolic Option Indicator | Hyp | Selects the hyperbolic option for use with the trigonometric functions.
Inverse Option Indicator | Inv | Selects the inverse option for use with the trigonometric functions.

By default, the options described in are not selected. Click Clr to deselect these options.

#### To Calculate Trigonometric Values

To calculate trigonometric values, use the buttons described in .

##### Calculating Trigonometric Values

Funktion | Knapp | Beskrivning | Exempel | Resultat
--- | --- | --- | --- | ---
Cosine `cos` | Cos, Hyp option not selected, Inv option not selected | Calculates the cosine of the current value in the display area. | 60 Cos | 0.5
Arc Cosine `acos` | Cos, Hyp option not selected, Inv option selected | Calculates the arc cosine of the current value in the display area. | 0.5 Inv Cos | 60
Hyperbolic Cosine `cosh` | Cos, Hyp option selected, Inv option not selected | Calculates the hyperbolic cosine of the current value in the display area. | 0.4 Hyp Cos | 1.081072372
Arc Hyperbolic Cosine `acosh` | Cos, Hyp option selected, Inv option selected | Calculates the arc hyperbolic cosine of the current value in the display area. | 1.6 Hyp Inv Cos | 1.046967915
Sine `sin` | Sin, Hyp option not selected, Inv option not selected | Calculates the sine of the current value in the display area. | 90 Sin | 1
Arc Sine `asin` | Sin, Hyp option not selected, Inv option selected | Calculates the arc sine of the current value in the display area. | 1 Inv Sin | 90
Hyperbolic Sine `sinh` | Sin, Hyp option selected, Inv option not selected | Calculates the hyperbolic sine of the current value in the display area. | 0.4 Hyp Sin | 0.410752326
Arc Hyperbolic Sine `asinh` | Sin, Hyp option selected, Inv option selected | Calculates the arc hyperbolic sine of the current value in the display area. | 1.6 Hyp Inv Sin | 1.248983328
Tangent `tan` | Tan, Hyp option not selected, Inv option not selected | Calculates the tangent of the current value in the display area. | 45 Tan | 1
Arc Tangent `atan` | Tan, Hyp option not selected, Inv option selected | Calculates the arc tangent of the current value in the display area. | 1 Inv Tan | 45
Hyperbolic Tangent `tanh` | Tan, Hyp option selected, Inv option not selected | Calculates the hyperbolic tangent of the current value in the display area. | 0.6 Hyp Tan | 0.537049567
Arc Hyperbolic Tangent `atanh` | Tan, Hyp option selected, Inv option selected | Calculates the arc hyperbolic tangent of the current value in the display area. | 0.6 Hyp Inv Tan | 0.693147181

#### To Calculate Logarithms

To calculate logarithms, use the buttons described in .

##### Beräknar logaritmer

Funktion | Knapp | Beskrivning | Exempel | Resultat
--- | --- | --- | --- | ---
Common Logarithm Base 10 | Log10 | Calculates the common logarithm (base 10) of the current value in the display area. | 10 Log10 | 1
Naturliga logaritmen | Ln | Calculates the natural logarithm of the current value in the display area. | 10 Ln | 2.30
Common Logarithm Base 2 | Log2 | Calculates the common logarithm (base 2) of the current value in the display area. | 10 Log2 | 3.32

Common antilogarithm and natural antilogarithm are not supported in this version of gcalctool.

#### To Perform Bitwise Calculations

To perform bitwise calculations, use the buttons described in .

##### Performing Bitwise Calculations

Funktion | Knapp | Beskrivning | Exempel | Resultat
--- | --- | --- | --- | ---
Bitvis OR | OR | Performs a bitwise OR operation on the current value in the display area and the next number that you enter, treating both numbers as unsigned long integers. | 10001000 OR 00010001 | 10011001
Bitvis AND | AND | Performs a bitwise AND operation on the current value in the display area and the next number that you enter, treating both numbers as unsigned long integers. | 10101010 AND 00110011 | 100010
Bitvis NOT | NOT | Performs a bitwise NOT operation on the current value in the display area, treating the number as an unsigned long integer. | For arithmetic precedence mode: NOT 1357ACE For non-arithmetic precedence mode: 1357ACE NOT | FECA8531
Bitvis XOR | XOR | Performs a bitwise XOR operation on the current value in the display area and the next number that you enter, treating both numbers as unsigned long integers. | 1100 XOR 1010 | 110
Bitvis XNOR | XNOR | Performs a bitwise XNOR operation on the current value in the display area and the next number that you enter, treating both numbers as unsigned long integers. | 1100 XNOR 1010 | 11111111111111111111111111111001

#### To Perform Bit Manipulations on Integers

To change the values of individuals bits in integer values, choose View Show Bit Editor. This option is only available in Scientific mode.

If the calculator display shows an integer value, then each of the bits in that integer value is displayed as a collection of 0's and 1's. By clicking on any of these individual bits, their value can be toggled, causing the displayed integer value to be adjusted accordingly.

#### To Enter Exponential Numbers

To enter exponential numbers, use the Exp button.

The Exp button enables you to enter numbers in scientific notation, that is, mantissa * baseexponent:

mantissa

  Current non-zero value in the display area. If the current value in the display area is zero, the mantissa is 1.0.

bas

  2, 8, 10, or 16 for binary, octal, decimal, and hexadecimal numeric base respectively.

exponent

  Next number that you enter.

When you click Exp, the calculator displays `. +` to represent base to the power of the next number that you enter.

To change the sign of the number, use the +/- button before the Exp button. How you change the sign of the exponent (the power to which the number is raised) depends on whether you are in arithmetic precedence mode or not. In arithmetic precedence mode, use - after the Exp button, otherwise use the +/- button after entering the exponent.

To enter a decimal number in exponential format, in arithmetic precedence mode, use the guidelines in the following table:

Tal | Enter | Number Displayed
--- | --- | ---
1200000000 | 12 Exp + 8 = | 1200000000
-1200000000 | - 12 Exp + 8 = | -1200000000
0.00000012 | 12 Exp-8= | 1.2e-7
-0.00000012 | - 12 Exp - 8 = | -1.2e-7

To enter a decimal number in exponential format, in non-arithmetic precedence mode, use the guidelines in the following table:

Tal | Enter | Number Displayed
--- | --- | ---
1200000000 | 12 Exp 8= | 1200000000
-1200000000 | 12 +/-Exp 8= | -1200000000
0.00000012 | 12 Exp 8+/- | 1.2e-7
-0.00000012 | 12 +/-Exp 8+/- | -1.2e-7

#### Använda konstanta värden

Click Con to display the list of defined constant values. All constant values are specified in decimal numeric base, even if the current numeric base is not decimal.

Select a constant from the menu to enter its value in the display area. If you use the keyboard shortcut #, you can use the keyboard to specify the constant, as shown in the following example:

Keyboard Entry | Konstant
--- | ---
# 3 | C3

The gcalctool application provides ten default constant values, as described in the following table:

Tal | Värde | Beskrivning
--- | --- | ---
C0 | 0.621 | Kilometer-to-mile conversion factor Multiply the current value in the display area by this constant, to convert from kilometers per hour to miles per hour. For example, 8 * Con C0 = 5. Divide the current value in the display area by this constant, to convert from miles per hour to kilometers per hour. For example, 5 / Con C0 = 8.
C1 | 1.414213562 | Kvadratroten ur 2
C2 | 2.718281828 | e
C3 | 3.141592653 | pi
C4 | 0.3937007 | Centimeter-to-inch conversion factor Multiply the current value in the display area by this constant, to convert from centimeters to inches. For example, 30 * Con C4 = 12. Divide the current value in the display area by this constant, to convert from inches to centimeters. For example, 12 / Con C4 = 30.
C5 | 57.295779513 | Degrees in a radian
C6 | 1048576 | 2 ^ 20
C7 | 0.0353 | Gram-to-ounce conversion factor Multiply the current value in the display area by this constant, to convert from grams to ounces. For example, 500 * Con C7 = 18. Divide the current value in the display area by this constant, to convert from ounces to grams. For example, 18 / Con C7 = 500.
C8 | 0.948 | Kilojoule-to-British-thermal-unit conversion factor Multiply the current value in the display area by this constant, to convert from kilojoules to British thermal units. For example, 10 * Con C8 = 9.48. Divide the current value in the display area by this constant, to convert from British thermal units to kilojoules. For example, 9.48 / Con C8 = 10.
C9 | 0.061 | Cubic-centimeter-to-cubic-inch conversion factor Multiply the current value in the display area by this constant, to convert from cubic centimeters to cubic inches. For example, 100 * Con C9 = 6.10. Divide the current value in the display area by this constant, to convert from cubic inches to cubic centimeters. For example, 6.10 / Con C9 = 100.

You can overwrite the default constants to store your own constants.

To store a new constant or edit an existing constant, perform the following steps:

1. Click Con, then select Edit Constants from the popup menu.

2. In the Edit Constants dialog, select the constant that you want to overwrite or edit.

3. Click on the Value field, then enter the new value.

4. Click on the Description field, then enter the new description.

5. Click OK to save your changes and close the Edit Constants dialog.

#### Använda funktioner

To show the available functions, click Fun. A popup menu displays the list of defined functions. Select a function from the menu to run that function. If the function is not defined, the value zero is returned.

If you use the keyboard shortcut F, you can use the keyboard to specify the function, as shown in the following example:

Keyboard Entry | Funktion
--- | ---
F 3 | F3

The gcalctool application does not provide any default functions. You can store up to ten functions.

To store a new function or edit an existing function, perform the following steps:

1. Click Fun, then select Edit Functions from the popup menu.

2. In the Edit Functions dialog, select a blank entry, or the function that you want to overwrite.

3. Click on the Value field, then enter the new value. Use the keyboard shortcuts to invoke a gcalctool button. For example, enter `90K` to calculate sine(90).

4. Click on the Description field, then enter the new description. For example, `Sine 90`.

5. Click OK to save your changes and close the Edit Functions dialog.

#### Manipulera binära tal

To manipulate binary numbers, use the buttons described in .

##### Manipulering av binärtal

Funktion | Knapp | Beskrivning | Exempel | Resultat
--- | --- | --- | --- | ---
Left Shift n | < | Shifts the current unsigned 32-bit binary value in the display area, the specified number of places to the left. Click <, then select the number of shift places from the popup menu. The number can be shifted up to 15 places left. | 111 <1 plats | 1110
Right Shift n | > | Shifts the current unsigned 32-bit binary value in the display area, the specified number of places to the right. Click >, then select the number of shift places from the popup menu. The number can be shifted up to 15 places right. | 1011 >1 plats | 101
Get a 16-Bit Unsigned Integer | &16 | Truncates the current value in the display area and returns a 16-bit unsigned integer. | FFFFF &16 | FFFF
Get a 32-Bit Unsigned Integer | &32 | Truncates the current value in the display area and returns a 32-bit unsigned integer. | FFFFFFFFFF &32 | FFFFFFFF

If you use keyboard shortcuts, you can use the keyboard to specify the number of places to shift, as shown in the following examples:

Keyboard Entry | Beskrivning
--- | ---
< 4 | Shifts the current binary value in the display area 4 places to the left.
> 4 | Shifts the current binary value in the display area 4 places to the right.

#### To Perform Miscellaneous Scientific Calculations

To perform miscellaneous scientific calculations, use the buttons described in .

##### Performing Miscellaneous Scientific Calculations

Funktion | Knapp | Beskrivning | Exempel | Resultat
--- | --- | --- | --- | ---
e to the x power | ex | Calculates the value of `e` raised to the power of the current value in the display area. | 2 ex | 7.39
10 to the x power | 10x | Calculates the value of 10 raised to the power of the current value in the display area. | 2 10x | 100
x to the y power | xy | Raises the current value in the display area to the power of the next value that you enter. | 2 xy4= | 16
x Factorial | x! | Calculates the factorial of the current value in the display area. x factorial is x*(x-1)*(x-2)...*1. This function applies only to positive integers. | 4 x! | 24
Modulus Division | Mod | Divides the current integer value in the display area by the next integer number that you enter, displaying the remainder. | 15 Mod 4= | 3
Slumptalsgenerator | Slump | Generates a random number in the range 0.0 to 1.0 then displays the random number in the display area. | Slump | 0.14
Hexadecimal Numerals | A to F inclusive | These numerals are available in hexadecimal base only. | B | B

### To Undo and Redo

To undo your previous action, choose Edit Undo . You can undo up to 15 past actions.

If you want to redo an action you just undo'ed, choose Edit Redo . You can redo up to 15 undo'ed actions.

### To Quit

To quit gcalctool, choose Calculator Quit .

When you quit gcalctool, the current values of the following settings are stored and automatically applied the next time you start gcalctool:

- Mode: Basic, Advanced, Financial, or Scientific

- Accuracy

- Memory Registers window displayed or not displayed, plus the contents of each memory register

- Numerisk bas

- Visningstyp

- Trigonometrisk typ

- Visa eftersläpande nollor

- Visa tusentalsavgränsare

## Teknisk information

### Order of Operations

By default, calculations are performed using arithmetic precedence. That is, the precedence of the arithmetic operators is taken into consideration and the result is only calculated when you click Return.

In the following example, the result of the calculation is 22 because the multiplication operator, `*`, has precedence over the addition operator, `+`.

    4 + 3 * 6 = 22

If you do not wish to apply arithmetic precedence to your calculations, select View Left-to-right Precedence.

If you choose not to apply arithmetic precedence, then the result the calculation in the example is 42 because the calculation is performed from left to right.

### Error Conditions

If you perform an invalid calculation, gcalctool indicates the error condition as follows:

- Displays the word `Error` in the display area.

- Displays an error message in the status bar.

- Makes all calculator buttons unavailable, except Clr.

- Makes all calculator options unavailable.

- Makes all calculator menu items unavailable, except Calculator Quit and Help Contents.

To clear the error condition, click Clr or press Shift Delete.

### Changing Modes

If the user tries to change modes when a partial calculation is being displayed, a warning dialog is displayed, telling the user that the current calculation will be cleared, and the base will be reset to decimal.

There is a checkbox present, that if checked, prevents the dialog from being shown again.

If the user presses the Cancel button, the change mode operation is cancelled. If the user presses the Change Mode button, the mode is changed and has the following side-effects:

- Clears the display.

- Sets the base to decimal.

- Sets the numeric display to fixed.

- Sets the accuracy to nine places after the numeric point.

- Clears the display of the thousands separator.

- Clears the display of trailing zeroes after the numeric point.

- Dismisses the register window if the new mode is Basic.

### Changing The Display Area

In arithmetic precedence mode, it is possible to use the mouse to click on the display area and edit it.

All the normal keyboard shortcuts will work, plus the addition of:

- Ctrl Delete which will delete the character to the right of the text cursor

- Home which moves the text cursor to the beginning of the display area

- End which moves the text cursor to the end of the display area

## Snabbreferens: Snabbtangenter

, , and provide a quick reference for all of the gcalctool keyboard shortcuts.

When you use the keyboard shortcut for any of the calculator buttons that have a menu associated with them, that menu is displayed. You can then use the arrow keys to select a menu item or the menu item's shortcut.

### Quick Reference for Keyboard Shortcuts of gcalctool Buttons

Snabbtangent | Knapp | Funktion | Se
--- | --- | --- | ---
0 till 9 inklusive | 0 to 9 inclusive | Numerals |
A | Noggr | Accuracy |
a | A | Hexadecimal numerals |
b | B | Hexadecimal numerals |
C | +/- | Change the arithmetic sign |
c | C | Hexadecimal numerals |
D | Ddb | Dubbelminskande nedvärdering |
d | D | Hexadecimal numerals |
E | Exp | Exponent |
e | E | Hexadecimal numerals |
F | Fun | Funktion |
f | F | Hexadecimal numerals |
G | Log | Vanlig logaritm |
i | Heltal | Heltalsdel |
J | Cos | Cosinus |
K | Sin | Sinus |
L | Tan | Tan |
l | Sln | Raklinjesminskning |
M | Mod | Modulus Division |
m | Ctrm | Sammansatt term |
N | Ln | Naturliga logaritmen |
n | Xnor | Bitvis XNOR |
P | Pmt | Periodisk betalning |
p | Pv | Nuvarande värde |
R | Hämt | Hämta värde från minnesregister |
r | 1/x | Reciprokt värde |
S | Lagr | Lagra värde i minnesregister |
s | Rot | Kvadratrot |
T | Rate | Periodisk räntesats |
t | Term | Betalningsperiod |
u | Abs | Absolutvärde |
v | Fv | Framtida värde |
X | Växla | Exchange memory register value and displayed value |
Y | Syd | Sum-of-the-years'-digits depreciation |
^ | xy | x to the y power |
! | x! | x factorial |
# | Kon | Konstant värde |
% | % | Percentage |
& | Och | Bitvis AND |
( och ) | ( och ) | Parentes |
* | * | Multiplikation |
+ | + | Addition |
- | - | Subtraktion |
. | . | Numeric point |
/ | / | Division |
: | Bråk | Decimaldelen |
< | < | Left shift n |
= or Return | = | Beräkna ett resultat |
> | > | Right shift n |
? | Slump | Random number generator |
@ | x2 | Kvadrat |
[ | &32 | Get a 32-bit unsigned integer |
] | &16 | Get a 16-bit unsigned integer |
x | Xor | Bitvis XOR |
{ | ex | e to the x power |
| | Eller | Bitvis OR |
} | 10x | 10 to the x power |
~ | Inte | Bitvis NOT |
Backsteg | Bckstg | Backsteg |
Esc eller Ctrl Backsteg | CE | Töm fält |
Shift Ta bort | Töm | Töm |

### Quick Reference for Keyboard Shortcuts of gcalctool Scientific Mode Options

Snabbtangent | Alternativ | Funktion | Se
--- | --- | --- | ---
Alt a | Gradians | Set the trigonometric type to gradians. |
Alt b | Bin | Set the numeric base to binary. |
Alt d | Dec | Set the numeric base to decimal. |
Alt f | Fix | Set the display type to fixed-point format. |
Alt g | Grader | Set the trigonometric type to degrees. |
Alt i | Inv | Select the inverse option for use with the trigonometric functions. |
Alt n | Eng | Set the display type to engineering format. |
Alt o | Okt | Set the numeric base to octal. |
Alt r | Radians | Set the trigonometric type to radians. |
Alt s | Sci | Set the display type to scientific format. |
Alt x | Hex | Set the numeric base to hexadecimal. |
Alt y | Hyp | Select the hyperbolic option for use with the trigonometric functions. |

### Quick Reference for Keyboard Shortcuts of gcalctool Menu Items

Snabbtangent | Menu Item | Funktion | Se
--- | --- | --- | ---
Ctrl b | Visa Grundläggande | Change to Basic mode |
Ctrl c | Redigera Kopiera | Copy the current value in the display area to the clipboard |
Ctrl e | Visa Show Bitcalculating Extension | Display the bitcalculation extension |
Ctrl f | Visa Ekonomi | Ändra till ekonomiläge |
Ctrl h | Hjälp Innehåll | Display the gcalctool online help |
Ctrl i | Redigera Infoga ASCII-värde | Display the Insert ASCII Value dialog |
Ctrl k | Visa Visa tusentalsavgränsare | Display the thousands separator |
Ctrl l | Visa Left-to-right Precedence | Calculate results using left-to-right precedence |
Ctrl m | Visa Minnesregister | Display the Memory Registers window |
Ctrl q | Miniräknare Avsluta | Quit the gcalctool application |
Ctrl r | Visa Arithmetic Precedence | Calculate results using arithmetic precedence |
Ctrl s | Visa Vetenskapligt | Change to Scientific mode |
Ctrl t | Visa Visa eftersläpande nollor | Show trailing zeroes |
Ctrl v | Redigera Klistra in | Paste the current value in the clipboard to the display area |
Ctrl z | Redigera Undo | Undo previous action |
Shift Ctrl z | Redigera Redo | Redo an undo'ed action |