1CALCULATOR(1) General Commands Manual CALCULATOR(1)
2
3
4
6 calculator - simple desktop calculator
7
9 calculator
10
12 The FOX Calculator is a simple desktop calculator geared toward the
13 programmer. It supports not only a full complement scientific func‐
14 tions, but also common operations that programmers need, such as bit‐
15 wise operations, bitwise shifting, and base-2 logarithm and exponents,
16 and numeric conversion between hexadecimal, octal, binary, and decimal.
17
18 The FOX Calculator implements correct operator precedences, so expres‐
19 sions like 2+3*5 yield the correct result, which is 17, and not 25.
20 Also featured is a constant memory, which permanently stores its value
21 even if you exit the calculator and restart it later.
22
23
24
26 Pressing on the calculator icon brings up the Calculator Preferences
27 dialog. The Calculator Preferences dialog comprises three settings:
28
29 - Settings for the calculator itself;
30 - Color settings of the button groups;
31 - Information about the calculator.
32
33 In the Calculator settings panel, you can change font used for the dis‐
34 play, by pressing the "Set..." button to bring up the standard Font
35 Selection Dialog.
36
37 You can change the way numbers are printed as well. Checking "Always
38 show exponent" will cause the calculator display always to display the
39 number in exponential notation. Checking "Never show exponent" will
40 cause the calculator to render the number in simple dot notation.
41
42 The precision can be set by means of the spin button; the default pre‐
43 cision is set to 16. Finally, the calculator can be set to beep when
44 errors occur.
45
46 In the Color settings panel, you can change the colors of the various
47 button groups. The buttons are grouped by function; the numbers are in
48 one group, and the operators are in another, and so on.
49
50 In the About panel, some information is presented about the calculator,
51 like version number and author's contact.
52
53
55 You can enter a number by clicking on the digit buttons, or simply hit
56 the right digit on the keyboard. Numbers in exponential notation are
57 entered by entering the mantissa first, then hitting the "EXP" button,
58 and then entering the exponent. Up to 3 digits may be entered for the
59 exponent; entering more than 3 will cause the digits to shift, i.e. the
60 first digit entered will be dropped and replaced by the second, the
61 second digit will be replaced by the third, and the third will be
62 replaced by the new input.
63
64 Changing the sign of the exponent is accomplished by hittin the At any
65 time, you can hit the Backspace key to delete the last digit entered.
66 Two numbers, pi and e (euler's number) may be entered with a single
67 button:
68
69 pi - Enters the number 3.1415926535897932384626433833
70
71 e - Enters the number 2.7182818284590452353602874713 (hit the "inv"
72 button first)
73
74
76 The operators in the FOX Calculator are the usual suspects:
77
78 + Addition
79
80 - Substraction
81
82 * Multiplication
83
84 / Floating point division
85
86 In addition, FOX Calculator also includes bitwise operators, such as:
87
88 AND Bit-wise logical and
89
90 OR Bit-wise logical or
91
92 XOR Bit-wise logical exclusive or
93
94 NOT Bit-wise logical not
95
96 SHL Bit-wise shift left
97
98 SHR Bit-wise shift right
99
100 SAR Bit-wise signed shift right (hit the "inv" button first)
101
102 Also nice for programmers is the inclusion of integer operations:
103
104 mod Integer modulo
105
106 div Integer division (hit the
107
108 All the operators have certain precedence relations with each other, so
109 that an expression is evaluated correctly.
110
111
113 The Calculator incorporates the usual trigonometric functions:
114
115 sin Sine
116
117 cos Cosine
118
119 tan Tangent
120
121 asin Inverse sine or arc sine (hit the "inv" button first)
122
123 acos Inverse cosine
124
125 atan Inverse tangent
126
127 sinh Hyperbolic sine (hit the "hyp" button first)
128
129 cosh Hyperbolic cosine
130
131 tanh Hyperbolic tangent
132
133 asinh Inverse hyperbolic sine (hit the "hyp" and "inv"buttons first)
134
135 acosh Inverse hyperbolic cosine
136
137 atanh Inverse hyperbolic tangent
138
139 For the first 6 functions, the angle mode determines whether the argu‐
140 ment is specified in terms of degrees, radians, or grad. Note that the
141 angle mode is preserved across invocations of the Calculator.
142
144 Other functions supported by the calculator are the following:
145
146 log Base 10 logarithm
147
148 ln Natural logarithm
149
150 2log Base 2 logarithm
151
152 x! Factorial
153
154 nPr Permutations
155
156 nCr Combinations
157
158 sqrt Square root
159
160 x^y X raised to the power y
161
162 1/x Reciprocal
163
164 10^x Base 10 exponentiation (hit the "inv" button first)
165
166 e^x Exponentiation
167
168 2^x Base 2 exponentiation
169
170 x^1/y X raised to the power 1/y
171
172 x^2 X squared
173
175 The calculator works in IEEE 746 double precision mode; for bit-wise
176 operations, it uses 32 bit integers. Thus, the numeric limits are as
177 follows:
178
179 Smallest real number: 2.2250738585072010e-308
180 Largest real number: 1.7976931348623158e+308
181 Smallest integer number: 0
182 Largest integer number: 4294967295
183
185 This manpage was originally written by Bastian Kleineidam
186 <calvin@debian.org> for the Debian distribution of the FOX Toolkit.
187
188 The main author of FOX is Jeroen van der Zijp <jeroen@fox-toolkit.org>.
189 For a list of contributors see /usr/share/doc/libfox0.99/AUTHORS.
190
191
192
193 30 January 2002 CALCULATOR(1)