GNOME Calculator
   HOME

TheInfoList



OR:

GNOME Calculator, formerly known as gcalctool, is the
software calculator A software calculator is a calculator that has been implemented as a computer program, rather than as a physical hardware device. They are among the simpler interactive software tools, and, as such, they provide operations for the user to sele ...
integrated with the GNOME desktop environment. It is programmed in C and
Vala Vala or VALA may refer to: Religion and mythology * Vala (Vedic), a demon or a stone cavern in the Hindu scriptures * Völva, also spelled Vala, a priestess in Norse mythology and Norse paganism Fiction * Vala (Middle-earth), an angelic being in ...
and part of the
GNOME Core Applications GNOME Core Applications is a software suite of approximately 30 application software that are packaged as part of the standard free and open-source GNOME desktop environment. GNOME Core Applications have the look and feel of the GNOME desktop, an ...
.


Views

* ''Basic'' – interface for basic arithmetic, resembling a desk calculator. * ''Advanced'' – an interface with scientific functions, and support for custom variables. * ''Financial'' – financial calculation and
currency conversion In finance, an exchange rate is the rate at which one currency will be exchanged for another currency. Currencies are most commonly national currencies, but may be sub-national as in the case of Hong Kong or supra-national as in the case of ...
. * ''Programming'' – a view with bit manipulation operators and
radix In a positional numeral system, the radix or base is the number of unique digits, including the digit zero, used to represent numbers. For example, for the decimal/denary system (the most common system in use today) the radix (base number) is ...
conversion. * ''Keyboard'' – most of the space is taken up by the output, with no on-screen buttons. Supports currency and unit conversion.


Notation

The GNOME calculator uses the common
infix notation Infix notation is the notation commonly used in arithmetical and logical formulae and statements. It is characterized by the placement of operators between operands—" infixed operators"—such as the plus sign in . Usage Binary relations are ...
for
binary function In mathematics, a binary function (also called bivariate function, or function of two variables) is a function that takes two inputs. Precisely stated, a function f is binary if there exists sets X, Y, Z such that :\,f \colon X \times Y \righta ...
s, such as the four basic arithmetic operations. Unlike many other calculators, it uses
prefix notation Polish notation (PN), also known as normal Polish notation (NPN), Łukasiewicz notation, Warsaw notation, Polish prefix notation or simply prefix notation, is a mathematical notation in which operators ''precede'' their operands, in contrast t ...
, not
postfix notation Reverse Polish notation (RPN), also known as reverse Łukasiewicz notation, Polish postfix notation or simply postfix notation, is a mathematical notation in which operators ''follow'' their operands, in contrast to Polish notation (PN), in w ...
for
unary function A unary function is a function that takes one argument. A unary operator belongs to a subset of unary functions, in that its range coincides with its domain. In contrast, a unary function's domain may or may not coincide with its range. Exampl ...
s. So to calculate e.g. the
sine In mathematics, sine and cosine are trigonometric functions of an angle. The sine and cosine of an acute angle are defined in the context of a right triangle: for the specified angle, its sine is the ratio of the length of the side that is opp ...
of
one 1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment of length 1. I ...
, the user must push the keys "sin", "1", "=" – not "1", "sin" as on many other calculators. The decimal separator on the
number pad A numeric keypad, number pad, numpad, or ten key, is the palm-sized, usually-17-key section of a standard computer keyboard, usually on the far right. It provides calculator-style efficiency for entering numbers. The idea of a 10-key nu ...
is based on the general keyboard layout since version 3.12.3.


Variable handling

''Advanced'', ''Financial'', and ''Programming'' modes present features for storing and retrieving values labeled as variables. ''R'' is the symbol for ''variable'', used on GUI buttons ''←R'' (insert variable) and ''→R'' (assign variable). Variable names are case-sensitive alphabetical string without spaces. Variable values are numerical strings. Values are assigned to variable names by entering in the GUI text input/result field a variable name followed by 0 or more spaces, followed by the ''='' character, followed by 0 or more spaces, followed by either a numeric value or an existing variable name, e.g. "x = 2" or "result = subtotal" (if subtotal was already assigned a numeric value). A numeric value is assigned to the first variable name. If the value was entered as an existing variable name rather than as a numeric value, the existing variable's value is assigned to the first variable name. Assignment to a variable name that does not exist creates the new variable by name with the assigned value. The ''→R'' (assign variable) GUI button shows a popup menu of existing variables (and the current value of each), to which selected variable is assigned the current numeric value displayed in the calculator, just as if that variable name were entered in the GUI text field followed by a ''='' followed by the numeric value. Entering a variable name into the GUI text field substitutes the variable value for the variable name when the expression in the GUI text field is evaluated (e.g. when the keyboard <Enter> button or the ''='' GUI button is pressed). The ''←R'' (insert variable) GUI button shows a popup menu of existing variables (and the current value of each); the selected variable name is inserted (appended) into the GUI text field. Two predefined variables are available from the ''←R'' (insert variable) GUI button: ''ans'' and ''rand''. ''ans'' contains the last "answer" value calculated by the calculator as a result. ''rand'' contains a random value between 0.0 and 1.0 (the value is not displayed; a rand variable is evaluated in an expression when calculating a result). Variable names and values persist between launch and quit of the application.


See also

*
Comparison of software calculators This is a list of notable software calculators. Immediate execution calculators (button-oriented) Expression or formula calculators (command-line oriented) See also * Software calculator * Calculator input methods * Formula calculator * ...
*
KCalc KCalc is the software calculator integrated with the KDE Gear. In the default view it includes a number pad, buttons for adding, subtracting, multiplying, and dividing, brackets, memory keys, percent, reciprocal, factorial, square, and x to the p ...


References


External links

* {{GNOME Software calculators GNOME Core Applications Software that uses GTK Software that uses Meson Free software programmed in C Free software programmed in Vala