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

对于本文档的复制、分发和/或修改必须遵循自由软件基金会 (Free Software Foundation) 发布的 GNU 自由文档许可证 (GFDL) 版本 1.1 或更高版本， 该许可证没有固定的部分、没有封面和背页文本。您可以在此链接上或在随本手册一起分发的 COPYING-DOCS 文件中找到 GFDL 的副本。

本手册是在 GFDL 许可之下分发的 GNOME 手册集合的一部分。如果想要 单独分发此手册，可以在手册中添加该许可证的一份副本然后分发，如该许可证的 第 6 部分所述。

各个公司使用的许多用于区别它们产品和服务的名称都声明为商标。在所有的 GNOME 文档以及 GNOME Documentation Project 的成员中，这些名称都 是以全大写字母或首字母大写显示，从而表明它们是商标。

本文档以及文档的修改版本都是在遵循 GNU 自由文档许可证的条款下提供，这表 示具有以下含义：

1. 文档按“原样”提供，不提供任何明示或暗示的保证，包括但不 限于：文档或文档的修改版本没有适销性方面的缺陷、适合特定目的的适用 性，以及没有侵权行为。您将自行承担本文档以及文档修改版本的质量、准 确性以及性能方面的风险。如果任何文档或文档修改版本存在缺陷，您（而 不是最初的编写者、作者或撰写人）将承担所有必需的服务、维修或更正的 费用。此免责声明是本许可证的重要组成部分。如果不接受此免责声明， 那么您就没有权利使用任何文档或文档的修改版本；并且

2. 无论在任何情况以及在任何法律理论下，本文档或文档修改版本的作 者、最初的编写者、任何撰写人或任何分发者，或者任意这些方的任何提供 者都不对任何人由于使用本文档或文档修改版本引起或带来的任何直接的、间接的、 特殊的、偶然的或继发的损失承担任何民事（包括疏忽）、合同或其它方面的 责任，这些损失包括但不限于信誉损失、工作停止、计算机失败或故障，或任 何以及所有其它损失或由此引发的或与之相关的损失，即使这些方已被告知存 在出现此类损失的可能性时也是如此。

Sun Microsystems Inc.
Calculator Manual V2.9
March 2005

Sun Java Desktop System Documentation Team

GNOME Documentation Project

Calculator Manual V2.8
August 2004

Sun Java Desktop System Documentation Team

GNOME Documentation Project

gcalctool Manual V2.7
February 2004

Sun GNOME Documentation Team

GNOME Documentation Project

gcalctool Manual V2.6
October 2003

Sun GNOME Documentation Team

GNOME Documentation Project

gcalctool 手册 V2.5
July 2003

Sun GNOME Documentation Team

GNOME Documentation Project

gcalctool 手册 V2.4
2003 年 6 月

Sun GNOME Documentation Team

GNOME Documentation Project

gcalctool 手册 V2.3
2003 年 4 月

Sun GNOME Documentation Team

GNOME Documentation Project

gcalctool 手册 V2.2
2003 年 4 月

Sun GNOME Documentation Team

GNOME Documentation Project

gcalctool 手册 V2.1
2003 年 3 月

Sun GNOME Documentation Team

GNOME Documentation Project

gcalctool 手册 V2.0
2003 年 3 月

Sun GNOME Documentation Team

GNOME Documentation Project

This manual describes version 5.5.37 of Calculator.

## 反馈

要报告关于 Calculator 应用程序或本手册的错误或提出建议，请遵循 GNOME 反馈页中的指导。

## 简介

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.

弹出菜单

  显示弹出菜单符号。 符号（位于 Calculator 按钮上）指示单击按钮时显示一个弹出菜单。

Status Bar

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

## 用法

### 使用计算器功能

要执行一项运算，请使用以下方法之一：

- 单击 Calculator 按钮，输入数字和函数。

- 将焦点转到 Calculator 窗口，然后使用键盘或数字键盘指定要执行的运算。有关键盘快捷键的完整列表，请参见 。

Calculator 应用程序自动以指数的形式显示超过 40 位的数字和小数。例如，下表显示了在使用十进制并精确到小数点后两位时显示的值：

显示 | 表示
--- | ---
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
Calculate a result | = | 使用当前进制显示运算的结果。 | 1 + 2 = | 3
加 | + | 将显示区域中的当前值与您输入的下一个数字相加。 | 1 + 2 = | 3
减 | - | 从显示区域中的当前值中减去您输入的下一个数字。 | 3 - 2 = | 1
乘 | * | 将显示区域中的当前值与您输入的下一个数字相乘。 | 3 * 2 = | 6
除 | / | 用显示区域中的当前值除以您输入的下一个数字。 | 6 / 3 = | 2
Change the arithmetic sign | +/- | 将正数更改为负数，或将负数更改为正数。 | 8 +/- | -8

#### 擦除字符

要擦除字符，请使用中介绍的按钮。

##### 擦除字符

功能 | 按钮 | 说明 | 示例 | 结果
--- | --- | --- | --- | ---
Backspace | Bksp | 删除显示区域中最右端的字符。 | 1 + 22 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 + 22 CE =

If the calculator is in Arithmetic Precedence mode:

1 + 22 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 + 22 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
圆括号 | “(”和“)” | 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

#### 使用计算器存储寄存器

您可以将值存储于“R0”至“R9”这十个 Calculator 存储寄存器中的任何一个中。要显示存储寄存器，请选择 “视图”“存储寄存器”。

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

第四年的折旧额为 $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

Term

  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

跨 20 年支付的 $1,000,000 合现值美元为 $456,427.28。

分期利率

Rate

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

Term

  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

第四年的折旧额为 $1014.29。

支付期间

Term

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 应用程序提供了十个默认常数值，如下表所述：

数字 | 值 | 说明
--- | --- | ---
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 应用程序没有提供任何默认函数。您最多可以存储十个函数。

要存储新函数或编辑现存函数，请执行下列步骤：

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.

### 错误情况

如果执行了无效运算，Calculator 会以下列方式指示发生了错误：

- 在显示区域中显示单词 `Error`。

- Displays an error message in the status bar.

- 使所有计算器按钮不可用（“Clr”按钮除外）。

- 使所有计算器选项不可用。

- 使所有计算器菜单项不可用（以下按钮除外：“计算器”“退出”和“帮助”“内容”。

To clear the error condition, click Clr or press ShiftDelete.

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

- CtrlDelete 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 | +/- | Change the arithmetic sign |
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 | Rate | Periodic interest rate |
t | Term | 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 |
( 和 ) | “(”和“)” | 圆括号 |
* | * | 乘 |
+ | + | 加 |
- | - | 减 |
. | . | 小数点 |
/ | / | 除 |
: | Frac | Fractional portion |
< | < | Left shift n |
= 或回车键 | = | Calculate a result |
> | > | 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 CtrlBackspace | CE | Clear entry |
Shift删除 | Clr | 清除 |

### Calculator“科学模式”选项键盘快捷键快速参考

键盘快捷键 | 选项 | 功能 | 请参见
--- | --- | --- | ---
Alta | Gradians | Set the trigonometric type to gradians. |
Altb | Bin | 将数值进制设置为二进制。 |
Altd | Dec | 将数值进制设置为十进制。 |
Altf | Fix | Set the display type to fixed-point format. |
Altg | 角度 | Set the trigonometric type to degrees. |
Alti | Inv | 选择用于三角函数的反转选项。 |
Altn | Eng | Set the display type to engineering format. |
Alto | Oct | 将数值进制设置为八进制。 |
Altr | 弧度 | Set the trigonometric type to radians. |
Alts | Sci | Set the display type to scientific format. |
Altx | Hex | 将数值进制设置为十六进制。 |
Alty | Hyp | 选择用于三角函数的双曲线选项。 |

### Calculator 菜单项键盘快捷键快速参考

键盘快捷键 | 菜单项 | 功能 | 请参见
--- | --- | --- | ---
Ctrlb | “视图” “基本” | Change to Basic mode |
Ctrlc | “编辑” “复制” | 将显示区域中的当前值复制到剪贴板上 |
Ctrlf | “视图” “财务” | Change to Financial mode |
Ctrlh | “帮助” “内容” | 显示 Calculator 联机帮助 |
Ctrli | “编辑” Insert ASCII Value | Display the Insert ASCII Value dialog |
Ctrlk | “视图” Show Thousands Separator | Display the thousands separator |
Ctrll | “视图” Left-to-right Precedence | Calculate results using left-to-right precedence |
Ctrlm | “视图” “存储寄存器” | 显示“存储寄存器”窗口 |
Ctrlp | “视图” Programming | Change to Programming mode |
Ctrlq | Calculator “退出” | 退出 Calculator 应用程序 |
Ctrlr | “视图” Arithmetic Precedence | Calculate results using arithmetic precedence |
Ctrls | “视图” “科学” | Change to Scientific mode |
Ctrlt | “视图” “末尾补零” | 末尾补零 |
Ctrlv | “编辑” “粘贴” | 将剪贴板中的当前值粘贴到显示区域中 |
Ctrlz | “编辑” Undo | Undo previous action |
ShiftCtrlz | “编辑” Redo | Redo an undo'ed action |