# 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
GNOME 文件專案

根據自由軟體基金會 (Free Software Foundation) 所發佈 的 GNU 自由文件授權 (GNU Free Documentation License, GFDL) 1.1 (含) 以後版本， 使用者可以複製、散佈，或修改本文件，但不得增刪章節，不得加上封面文字， 亦不得加上封底文字。 如要取得 GFDL 的副本，請參閱 此連結，或是參閱與本手冊一同隨附的 COPYING-DOCS 檔案。

本手冊是屬於依 GFDL 授權所發佈之 GNOME 手冊集中的一部份。 如果您只要單獨散佈本手冊，依據授權聲明第六節之敘述， 您必須另外將授權聲明加入本手冊中。

許多公司為了突顯其產品與服務，會使用特別名稱，並亦已聲明這些 名稱為其商標。當這些名稱出現在 GNOME 文件中，同時 GNOME 文件 專案小組成員亦明白這些名稱為商標時， 這些名稱會以大寫字母或是首字母大寫表示。

DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE WITH THE FURTHER UNDERSTANDING THAT:

1. DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER; AND

2. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, INITIAL WRITER, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR LOSSES ARISING OUT OF OR RELATING TO USE OF THE DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.

Sun Microsystems Inc.
Calculator Manual V2.9
March 2005

Sun Java Desktop System Documentation Team

GNOME 文件專案

Calculator Manual V2.8
August 2004

Sun Java Desktop System Documentation Team

GNOME 文件專案

gcalctool Manual V2.7
February 2004

Sun GNOME 文件小組

GNOME 文件專案

gcalctool Manual V2.6
October 2003

Sun GNOME 文件小組

GNOME 文件專案

計算機手冊 V2.5
July 2003

Sun GNOME 文件小組

GNOME 文件專案

gcalctool 手冊 V2.4
2003 年 6 月

Sun GNOME 文件小組

GNOME 文件專案

gcalctool 手冊 V2.3
2003 年 4 月

Sun GNOME 文件小組

GNOME 文件專案

gcalctool 手冊 V2.2
2003 年 4 月

Sun GNOME 文件小組

GNOME 文件專案

gcalctool 手冊 V2.1
2003 年 3 月

Sun GNOME 文件小組

GNOME 文件專案

gcalctool 手冊 V2.0
2003 年 3 月

Sun GNOME 文件小組

GNOME 文件專案

This manual describes version 5.5.37 of Calculator.

## 回饋

關於本 Calculator 應用程式或 手冊，如果要報告錯誤或提出建議，請遵照 GNOME Feedback Page 的指示。

## 介紹

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

基本

  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.

Advanced

  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, Scientific and Programming modes.

財務

  提供一些複雜的財務函數。

科學

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

Programming

  Provides functions useful to a programmer, including bitwise functions and a bit editor.

您可以在下列的數值系統中使用 Calculator：

數值系統 | 基礎
--- | ---
二進制 | 2
八進制 | 8
十進制 | 10
十六進制 | 16

## Getting Started

You can start gcalctool in the following ways:

Menu

  Choose Accessories Calculator.

Command line

  Execute the following command: `gnome-calculator`

When you start gcalctool, the following window is displayed:

### Calculator 基本模式視窗

Shows gcalctool Basic mode window.

The gcalctool window contains the following elements:

功能表列

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

顯示區域

  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.

模式區域

  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, Scientific and Programming modes.

即現式功能表

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

Status Bar

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

## 使用

### 使用計算機函數

如果要執行計算，請使用下列任一種 方法：

- 按一下 Calculator 按鈕可以輸入數字和函數。

- 給予 Calculator 視窗焦點，然後使用鍵盤或數字鍵組來指定您要執行的計算。若需鍵盤捷徑的完整清單，請參閱 。

Calculator 應用程式會自動以 40 位數以上和小型字 (如指數) 來顯示數字。例如，下列表格將顯示當使用十進制數值基礎且設定 2 位數的精準度時所顯示的值：

顯示 | 意義
--- | ---
1.23e+37 | 1.23 * 1037
1e-5 | 0.00001

若需如何輸入指數的詳細資訊，請參閱 。

#### 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

如果要複製計算的結果，請選擇 編輯複製。 您可以將值貼入其他的應用程式。

如果要將上一次複製的值貼入顯示區域，請選擇 編輯貼上。

### 執行基本計算

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.

#### 執行簡單的計算

如果要執行簡單的計算，請使用 中所述的按鈕。

##### 執行簡單的計算

功能 | 按鈕 | 說明 | 範例 | 結果
--- | --- | --- | --- | ---
數字 | 0 到 9 以內的數字 | 在十進制和十六進制基礎中，可以使用所有的數字。在八進制中，不可以使用 8 和 9。在二進制中，只能使用 0 和 1。預設基礎為十進制。 | 1 | 1
數字點 | 。 | 開始輸入數字的分數部份。 | 1 。 2 | 1.2
計算結果 | = | 顯示以目前基礎求得的計算結果。 | 1 + 2 = | 3
加 | + | 將顯示區域的目前值加上下一個您輸入的數字。 | 1 + 2 = | 3
減 | - | 將顯示區域的目前值減去下一個您輸入的數字。 | 3 - 2 = | 1
乘 | * | 將顯示區域的目前值乘上下一個您輸入的數字。 | 3 * 2 = | 6
除 | / | 將顯示區域的目前值除以下一個您輸入的數字。 | 6 / 3 = | 2
變更算術符號 | +/- | 將正數變為負數，或將負數變為正數。 | 8 +/- | -8

#### 消除字元

如果要消除字元，請使用 中所述的按鈕。

##### 消除字元

功能 | 按鈕 | 說明 | 範例 | 結果
--- | --- | --- | --- | ---
Backspace | Bksp | 移除顯示區域最右邊的字元。 | 1 + 2 2 Bksp = | 3

清除輸入

CE

移除顯示區域的目前值。

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

清除 | Clr | 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 Clr | 0

#### 顯示 ASCII 值

如果要顯示字元的 ASCII 值，請選擇 編輯插入 ASCII 值。

此時會顯示插入 ASCII 值對話方塊。

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.

### To Perform Advanced Calculations

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.

#### Performing Advanced Calculations

功能 | 按鈕 | 說明 | 範例 | 結果
--- | --- | --- | --- | ---
百分比 | % | Divides the current value by 100. | 560 % = | 5.60
倒數 | 1/x | 將顯示區域的目前值除1。 | 4 1/x | 0.25
平方根 | Sqrt | 計算顯示區域之目前值的平方根。 | For arithmetic precedence mode: Sqrt 9 )= For non-arithmetic precedence mode: 9 Sqrt | 3
平方 | x2 | 計算顯示區域之目前值的平方。 | 3 x2 | 9
整數部份 | Int | 計算顯示區域之目前值的整數部份。 | -23.45 Int | -23
分數部份 | Frac | 計算顯示區域之目前值的分數部份。 | -23.45 Frac | -0.45
絕對值 | Abs | 計算顯示區域之目前值的絕對值。 | -23.45 Abs | 23.45
括號 | ( and ) | 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

#### 使用計算機記憶體註冊

您可以將值儲存於 10 個 Calculator 記憶體註冊 R0 到 R9 中的任一個記憶體註冊。如果要顯示記憶體註冊，請選擇 檢視記憶體註冊。

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.

將說明您可以使用的記憶體函數。

##### 記憶體函數

功能 | 按鈕 | 說明 | 範例 | 結果
--- | --- | --- | --- | ---

將值儲存於記憶體註冊

Sto

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

如果要在 Calculator 階段作業期間清除記憶體註冊：

1. 按一下 Clr。

2. Click Sto.

3. 選取即現式功能表上的記憶體註冊。

22 Sto R2

The value 22 is stored in memory register R2.

擷取記憶體註冊的值 | Rcl | Retrieves the contents of the specified memory register. Click Rcl, then select the memory register from the popup menu. | 0 Rcl R2 | The value in the display area is 22.
將記憶體註冊值與顯示的值交換 | Exch | 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.

如果您是使用鍵盤捷徑，您可以使用鍵盤來指定記憶體註冊，如下列範例所示：

鍵盤輸入 | 說明
--- | ---
S 2 | 將顯示區域的目前內容儲存於記憶體註冊 R2。
R 2 | 擷取記憶體註冊 R2 的目前內容並放入顯示區域。
X 2 | 將顯示區域的目前值與記憶體註冊 R2 的內容交換。

### 執行財務計算

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:

#### Calculator 財務模式按鈕

Shows gcalctool Financial mode buttons.

如果要執行財務計算，請使用 中所述的按鈕。

#### 執行財務計算

功能 | 按鈕 | 說明 | 範例 | 結果
--- | --- | --- | --- | ---

複利期間

Ctrm

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

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, click Ctrm, and put the following values into the text entries:

定期利率

  0.0075

期約值

  16000

現值

  8000

Click Calculate

92.77

投資金額倍增所需的時間為 92.77 個月。

倍數餘額折舊

Ddb

使用倍數餘額法計算資產在指定時間週期內的折舊額。

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, click Ddb and put the following values into the text entries:

Cost

  8000

Salvage

  900

Life

  6

Period

  4

Click Calculate

790.12

第 4 年的折舊額為 $790.12。

期約值

Fv

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

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, press Fv and put the following values into the text entries:

分期付款

  4000

定期利率

  0.08

Number Of Periods

  20

Click Calculate

183047.86

當 20 年到期後，帳戶的價值為 $183,047.86。

Gross Profit Margin

Gpm

Calculates the resale price of a product, based on the product cost and the wanted gross profit margin.

You sell T-Shirts online. Each T-Shirt cost you $12 in material and labor. You want to sell the T-Shirts with a Gross Profit Margin of 0.40 - for every five dollars you earn, you want two to be profit. To calculate the price you would have to sell your T-Shirts for, press Gpm and put the following values into the text entries:

Cost

  12

Margin

  0.40

Click Calculate

20

You will have to sell your T-Shirts for $20

分期付款

Pmt

計算貸款每期付款的金額，其中付款日期為每一個付款週期的最後一天。

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, press Pmt and put the following values into the text entries:

Principal

  120000

定期利率

  0.00917

期間

  360

Click Calculate

1143.15

每月償還的金額為 $1143.15。

現值

Pv

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

您剛嬴得了一佰萬元。獎金將分 20 年領取每年領取 $50,000。每年的最後一天領取獎金。如果您想接受每年領取 $50,000，即表示您的投資為年利率 9% 每年複利計算。

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, press Pv and put the following values into the text entries:

分期付款

  50000

定期利率

  0.09

Number Of Periods

  20

Click Calculate

456427.28

$1,000,000 分20 年領取相當於現值 $456,427.28。

定期利率

利率

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

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, press Rate and put the following values into the text entries:

期約值

  30000

現值

  20000

期間

  60

Click Calculate

.00678

月利率為 0.678%。年利率為 0.678% * 12 = 8.14%。

直線折舊

Sln

計算資產在指定期間內的直線折舊額。折舊額為成本 - 剩餘價值。直線折舊法是將折舊額平均分攤於資產的使用年限。使用年限是資產的折舊期間，通常為年。

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, prss Sln, and put the following values into the first three memory registers:

Cost

  8000

Salvage

  900

Life

  6

Click Calculate

1183.33

每年的折舊額為 $1183.33。

年數合計折舊

Syd

使用年數合計折舊法計算資產在指定時間週期內的折舊額。這種折舊法會加速折舊率，因此早期的折舊額會遠大於後期的折舊額。 折舊額為成本 - 剩餘價值。使用年限是資產的折舊期間，通常為年。

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, press Syd, and put the following values into the text entries:

Cost

  8000

Salvage

  900

Life

  6

Period

  4

Click Calculate

1014.29

第 4 年的折舊額為 $1014.29。

付款週期

期間

Calculates the number of payment periods that are necessary during the term of an ordinary annuity, to accumulate a future value, at a certain 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, press Term, and put the following values into the text entries:

分期付款

  1800

期約值

  120000

定期利率

  0.11

Click Calculate

20.32

帳戶會在 20.32 年內累積到 $120,000。

### 執行科學計算

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:

#### Calculator 科學模式按鈕

Shows gcalctool Scientific mode buttons.

#### 設定精確度

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.

下列表格中的範例將說明精確度設定對顯示區域中 x 的影響 (使用十進制基礎並選取顯示尾隨的零選項來計算 `1 / 8 = x`)：

精確度 | 結果
--- | ---
1 位數 | 1.2
2 位數 | 1.25
3 位數 | 1.250

#### 設定顯示類型

如果要設定顯示類型，請選取 中所述的按鈕。

##### 設定顯示類型

功能 | 按鈕 | 說明
--- | --- | ---
工程顯示類型 | Eng | Sets the display type to engineering format. Results are displayed in scientific notation. The exponent is always a multiple of three.
定點顯示類型 | 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.
科學顯示類型 | Sci | Sets the display type to scientific format. Results are displayed in scientific notation, with a fixed number of numeric digits.

#### 設定三角類型

如果要設定三角類型，請選取 中所述的按鈕。

##### 設定三角類型

功能 | 按鈕 | 說明
--- | --- | ---
角度 | 角度 | Sets the trigonometric type to degrees. Degrees is the default trigonometric type.
Gradians | Gradians | Sets the trigonometric type to gradians.
弧度 | 弧度 | Sets the trigonometric type to radians.

#### 設定三角選項

如果要設定三角選項，請使用 中所述的選項。

##### 設定三角選項

功能 | 按鈕 | 說明
--- | --- | ---
雙曲線選項指示器 | Hyp | 選取三角函數使用的雙曲線選項。
反三角選項指示器 | Inv | 選取三角函數使用的反三角選項。

依據預設，不會選取 中所述的選項。按一下 Clr 可以取消選取這些選項。

#### 計算三角值

如果要計算三角值，請使用 中所述的按鈕。

##### 計算三角值

功能 | 按鈕 | 說明 | 範例 | 結果
--- | --- | --- | --- | ---
餘弦 `cos` | 未選取 Cos、 Hyp 選項，未選取 Inv 選項 | 計算顯示區域之目前值的餘弦。 | 60 Cos | 0.5
反餘弦 `acos` | 未選取 Cos、Hyp 選項，未選取 Inv 選項 | 計算顯示區域之目前值的反餘弦。 | 0.5 Inv Cos | 60
雙曲餘弦 `cosh` | 未選取 Cos、Hyp 選項，未選取 Inv 選項 | 計算顯示區域之目前值的雙曲餘弦。 | 0.4 Hyp Cos | 1.081072372
反雙曲餘弦 `acosh` | 未選取 Cos、Hyp 選項，未選取 Inv 選項 | 計算顯示區域之目前值的反雙曲餘弦。 | 1.6 Hyp Inv Cos | 1.046967915
正弦 `sin` | 未選取 Sin、Hyp 選項，未選取 Inv 選項 | 計算顯示區域之目前值的正弦。 | 90 Sin | 1
反正弦 `asin` | 未選取 Sin、Hyp 選項，未選取 Inv 選項 | 計算顯示區域之目前值的反正弦。 | 1 Inv Sin | 90
雙曲正弦 `sinh` | 未選取 Sin、Hyp 選項，未選取 Inv 選項 | 計算顯示區域之目前值的雙曲正弦。 | 0.4 Hyp Sin | 0.410752326
反雙曲正弦 `asinh` | 未選取 Sin、Hyp 選項，未選取 Inv 選項 | 計算顯示區域之目前值的反雙曲正弦。 | 1.6 Hyp Inv Sin | 1.248983328
正切 `tan` | 未選取 Tan、Hyp 選項，未選取 Inv 選項 | 計算顯示區域之目前值的正切。 | 45 Tan | 1
反正切 `atan` | 未選取 Tan、Hyp 選項，未選取 Inv 選項 | 計算顯示區域之目前值的反正切。 | 1 Inv Tan | 45
雙曲正切 `tanh` | 未選取 Tan、Hyp 選項，未選取 Inv 選項 | 計算顯示區域之目前值的雙曲正切。 | 0.6 Hyp Tan | 0.537049567
反雙曲正切 `atanh` | 未選取 Tan、Hyp 選項，未選取 Inv 選項 | 計算顯示區域之目前值的反雙曲正切。 | 0.6 Hyp Inv Tan | 0.693147181

#### 計算對數

如果要計算對數，請使用 中所述的按鈕。

##### 計算對數

功能 | 按鈕 | 說明 | 範例 | 結果
--- | --- | --- | --- | ---
常用對數基礎 10 | Log10 | Calculates the common logarithm (base 10) of the current value in the display area. | 10 Log10 | 1
自然對數 | Ln | 計算顯示區域之目前值的自然對數。 | 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

這一版的 Calculator 不支援常用對數和自然對數。

#### 輸入指數

如果要輸入指數字，請使用 Exp 按鈕。

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.

base

  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:

數字 | 輸入 | 顯示的數字
--- | --- | ---
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:

數字 | 輸入 | 顯示的數字
--- | --- | ---
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

#### 使用定值

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.

請從功能表上選取一個常數，將它的值輸入顯示區域。如果您是使用鍵盤捷徑 #，您可以使用鍵盤來指定常數，如下列範例所示：

鍵盤輸入 | 常數
--- | ---
# 3 | C3

Calculator 應用程式提供 10 個預設定值，如下列表格所示：

數字 | 值 | 說明
--- | --- | ---
C0 | 0.621 | Kilometer-to-mile conversion factor 將顯示區域的目前值乘上這個常數，將每小時公里數轉換為每小時英里數。例如，8 * Con C0= 5。 將顯示區域的目前值除這個常數，將每小時英里數轉換為每小時公里數。例如，5 / Con C0= 8。
C1 | 1.414213562 | Square root of 2
C2 | 2.718281828 | e
C3 | 3.141592653 | pi
C4 | 0.3937007 | Centimeter-to-inch conversion factor 將顯示區域的目前值乘上這個常數，將公分轉換為英吋。例如，30 * Con C4= 12。 將顯示區域的目前值除這個常數，將英吋轉換為公分。例如，12 / Con C4= 30。
C5 | 57.295779513 | Degrees in a radian
C6 | 1048576 | 2 ^ 20
C7 | 0.0353 | Gram-to-ounce conversion factor 將顯示區域的目前值乘上這個常數，將克轉換為盎司。例如，500 * Con C7= 18。 將顯示區域的目前值除這個常數，將盎司轉換為克。例如，18 / Con C7= 500。
C8 | 0.948 | Kilojoule-to-British-thermal-unit conversion factor 將顯示區域的目前值乘上這個常數，將千焦耳轉換為英國熱量單位。例如，10 * Con C8= 9.48。 將顯示區域的目前值除這個常數，將英國熱量單位轉換為千焦耳。例如，9.48 / Con C8= 10。
C9 | 0.061 | Cubic-centimeter-to-cubic-inch conversion factor 將顯示區域的目前值乘上這個常數，將立方厘米轉換為立方英吋。例如，100 * Con C9= 6.10。 將顯示區域的目前值除這個常數，將立方厘米轉換為立方英吋。例如，6.10 / Con C9= 100。

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

如果要儲存新常數或編輯現有的常數，請執行下列的步驟：

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.

#### 使用函數

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.

如果您是使用鍵盤捷徑 F，您可以使用鍵盤來指定函數，如下列範例所示：

鍵盤輸入 | 功能
--- | ---
F 3 | F3

Calculator 應用程式不提供任何預設函數。您最多可以儲存 10 個函數。

如果要儲存新的函數或編輯現有的函數，請執行下列的步驟：

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.

#### 執行其他的科學計算

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

##### 執行其他的科學計算

功能 | 按鈕 | 說明 | 範例 | 結果
--- | --- | --- | --- | ---
e to the x power | ex | 計算顯示區域之目前值其 `e` 的次方值。 | 2 ex | 7.39
10 to the x power | 10x | 計算顯示區域之目前值其 10 的次方值。 | 2 10x | 100
2 to the x power | 2x | Calculates the value of 2 raised to the power of the current value in the display area. | 2 2x | 4
x to the y power | xy | 將顯示區域的目前值作為您輸入之下一個值的次方。 | 2 xy 4 = | 16
x to the reciprocal y power | x1/y | Raises the current value in the display area to the reciprocal power of the next value that you enter. | 2 x1/y 4 = | 16
x 階乘 | x! | 計算顯示區域之目前值的階乘。x 階乘為 x*(x-1)*(x-2)...*1。這個函數只可套用於正整數。 | 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
亂數產生器 | Rand | Generates a random number in the range 0.0 to 1.0 then displays the random number in the display area. | Rand | 0.14

### To Perform Programming Calculations

To change to Programming mode, choose View Programming .

When you change to Programming mode, the following widget is displayed above the Base and Advanced mode buttons:

#### gcalctool Programming Mode Buttons

Shows gcalctool Programming mode buttons.

#### 設定數值基礎

如果要設定數值基礎，請選取 中所述的按鈕。

##### 設定數值基礎

功能 | 按鈕 | 說明
--- | --- | ---
二進制基礎 | Bin | 將數值基礎設為二進制，即基底為 2。
八進制基礎 | Oct | 將數值基礎設為八進制，即基底為 8。
十進制基礎 | Dec | Sets the numeric base to decimal, that is, base 10. Decimal is the default numeric base. If you change from Programming mode to another mode, gcalctool automatically sets the numeric base to decimal.
十六進制基礎 | Hex | 將數值基礎設為十六進制，即基底為 16。

#### To Perform Bit Manipulations on Integers

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 in the Bit Editor. By clicking on any of these individual bits, their value can be toggled, causing the displayed integer value to be adjusted accordingly.

#### To Perform Bitwise Calculations

To perform bitwise calculations, use the buttons described in .

##### Performing Bitwise Calculations

功能 | 按鈕 | 說明 | 範例 | 結果
--- | --- | --- | --- | ---
Bitwise 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
Bitwise 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
Bitwise 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
Bitwise 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
Bitwise 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

#### 處理二進制數字

如果要處理二進制數字，請使用 中所述的按鈕。

##### 處理二進制數字

功能 | 按鈕 | 說明 | 範例 | 結果
--- | --- | --- | --- | ---
左移 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 位數 | 1110
右移 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 位數 | 101
取得 16 位元無符號整數 | &16 | 將顯示區域的目前值截斷並傳回一個 16 位元無符號整數。 | FFFFF &16 | FFFF
取得 32 位元無符號整數 | &32 | 將顯示區域的目前值截斷並傳回一個 32 位元無符號整數。 | FFFFFFFFFF &32 | FFFFFFFF

如果您是使用鍵盤捷徑，您可以使用鍵盤來指定要移動的位數，如下列範例所示：

鍵盤輸入 | 說明
--- | ---
< 4 | 將顯示區域中目前的二進制值左移 4 位數。
> 4 | 將顯示區域中目前的二進制值右移 4 位數。

#### To Perform Miscellaneous Programming Calculations

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

##### Performing Miscellaneous Programming Calculations

功能 | 按鈕 | 說明 | 範例 | 結果
--- | --- | --- | --- | ---
十六進制數字 | A to F inclusive | 這些數字只可用於十六進制基礎。 | 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.

### 結束

如果要結束 Calculator，請選擇 計算機結束。

當您結束 Calculator 時，即會儲存下列設定目前的值並在下次啟動 Calculator 時自動套用：

- Mode: Basic, Advanced, Financial, or Scientific

- 精確度

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

- 數值基礎

- 顯示類型

- 三角類型

- 顯示尾隨的零

- Show Thousands Separator

## 技術資訊

### 運算順序

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.

### 錯誤狀況

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

## 快速參考：鍵盤捷徑

、 和 提供了所有 Calculator 鍵盤捷徑的快速參考。

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.

### Calculator 按鈕之鍵盤捷徑的快速參考

鍵盤捷徑 | 按鈕 | 功能 | 請參閱
--- | --- | --- | ---
0 到 9 以內的數字 | 0 到 9 以內的數字 | 數字 |
A | Acc | 精確度 |
a | A | Hexadecimal numerals |
b | B | Hexadecimal numerals |
C | +/- | 變更算術符號 |
c | C | Hexadecimal numerals |
D | Ddb | Double-declining depreciation |
d | D | Hexadecimal numerals |
E | Exp | 指數 |
e | E | Hexadecimal numerals |
F | Fun | 功能 |
f | F | Hexadecimal numerals |
G | 10x | 10 to the x power |
g | Log | Common base 10 logarithm |
H | 2x | 2 to the x power |
h | Log2 | Common base 2 logarithm |
I | Gpm | Gross Profit Margin |
i | Int | Integer portion |
J | Cos-1 | Inverse Cosine |
j | Cos | 餘弦 |
K | Sin-1 | Inverse Sine |
k | Sin | 正弦 |
l | Sln | Straight-line depreciation |
M | Mod | Modulus Division |
m | Ctrm | Compounding term |
N | ex | e to the x power |
n | Ln | Natural logarithm |
O | x1/y | x to the reciprocaly power |
o or ^ | xy | x to the y power |
P | Pmt | Periodic payment |
p | Pv | Present value |
R | Rcl | Retrieve value from memory register |
r | 1/x | 倒數 |
S | Sto | Store value in memory register |
s | Sqrt | Square root |
T | 利率 | Periodic interest rate |
t | 期間 | Payment period |
u | Abs | Absolute value |
v | Fv | Future value |
W | Tan-1 | Inverse Tan |
w | 正切 | 正切 |
X | Exch | Exchange memory register value and displayed value |
x | Xor | Bitwise XOR |
Y | Syd | Sum-of-the-years'-digits depreciation |
! | x! | x factorial |
# | Con | Constant value |
% | % | 百分比 |
& | And | Bitwise AND |
( and ) | ( and ) | 括號 |
* | * | 乘 |
+ | + | 加 |
- | - | 減 |
。 | 。 | 數字點 |
/ | / | 除 |
： | Frac | Fractional portion |
< | < | Left shift n |
= 或 Return | = | 計算結果 |
> | > | Right shift n |
? | Rand | Random number generator |
@ | x2 | 平方 |
{ | Xnor | Bitwise XNOR |
[ | &32 | Get a 32-bit unsigned integer |
] | &16 | Get a 16-bit unsigned integer |
| | Or | Bitwise OR |
~ | Not | Bitwise NOT |
Backspace | Bksp | Backspace |
Esc or Ctrl Backspace | CE | Clear entry |
Shift Delete | Clr | 清除 |

### Calculator 科學模式選項之鍵盤捷徑的快速參考

鍵盤捷徑 | 選項 | 功能 | 請參閱
--- | --- | --- | ---
Alt a | Gradians | Set the trigonometric type to gradians. |
Alt b | Bin | 將數值基礎設為二進制。 |
Alt d | Dec | 將數值基礎設為十進制。 |
Alt f | Fix | Set the display type to fixed-point format. |
Alt g | 角度 | Set the trigonometric type to degrees. |
Alt i | Inv | 選取三角函數使用的反三角選項。 |
Alt n | Eng | Set the display type to engineering format. |
Alt o | Oct | 將數值基礎設為八進制。 |
Alt r | 弧度 | Set the trigonometric type to radians. |
Alt s | Sci | Set the display type to scientific format. |
Alt x | Hex | 將數值基礎設為十六進制。 |
Alt y | Hyp | 選取三角函數使用的雙曲線選項。 |

### Calculator 功能表項目之鍵盤捷徑的快速參考

鍵盤捷徑 | 功能表項目 | 功能 | 請參閱
--- | --- | --- | ---
Ctrl b | 檢視 基本 | Change to Basic mode |
Ctrl c | 編輯 複製 | 將顯示區域的目前值複製到剪貼簿。 |
Ctrl f | 檢視 財務 | Change to Financial mode |
Ctrl h | 說明 內容 | 顯示 Calculator 線上說明 |
Ctrl i | 編輯 Insert ASCII Value | Display the Insert ASCII Value dialog |
Ctrl k | 檢視 Show Thousands Separator | Display the thousands separator |
Ctrl l | 檢視 Left-to-right Precedence | Calculate results using left-to-right precedence |
Ctrl m | 檢視 記憶體註冊 | 顯示記憶體註冊視窗 |
Ctrl p | 檢視 Programming | Change to Programming mode |
Ctrl q | 計算機 結束 | 結束 Calculator 應用程式 |
Ctrl r | 檢視 Arithmetic Precedence | Calculate results using arithmetic precedence |
Ctrl s | 檢視 科學 | Change to Scientific mode |
Ctrl t | 檢視 顯示尾隨的零 | 顯示尾隨的零 |
Ctrl v | 編輯 貼上 | 將顯示區域的目前值貼入剪貼簿 |
Ctrl z | 編輯 Undo | Undo previous action |
Shift Ctrl z | 編輯 Redo | Redo an undo'ed action |