1ReactOS Calc is a programme for evaluating mathematical, financial and statistical calculations. 2 3ReactOS Calc has several features including: 4- Internal precision with 17 decimal numbers (standard IEEE math library). 5- Up to 512 bits of internal precision and 64 decimal digits displayed in the output display (with GNU multi-precision libraries). 6- Robust RPN (reverse polish notation) engine which allows a virtually unlimited number of arithmetic and algebraic sub-expressions. 7- Three different interfaces: standard, scientific or conversion. 8- Many common arithmetic, algebraic and statistical functions are included. 9 10The following topics will be discussed: 11 12HOW TO INPUT NUMBERS 13DISPLAY FORMAT 14ERROR MESSAGE 15ARITHMETIC FUNCTIONS 16LOGICAL FUNCTIONS 17ALGEBRAIC FUNCTIONS 18TRIGONOMETRIC FUNCTIONS 19THE PI BUTTON 20HYPERBOLIC FUNCTIONS 21STATISTICAL FUNCTIONS 22MEMORY FUNCTION 23DEGREE CONVERSION 24FIXED SCIENTIFIC NOTATION 25PERCENT MODE 26 27HOW TO INPUT NUMBERS 28-------------------- 29The ReactOS Calc provides some buttons for typing numbers and expressions. 30However, some of them are available only into Standard, Conversion or Scientific modes, or when the calculator is in a specific state. 31[0], [1], [2], [3], [4], [5], [6], [7], [8], [9] 32Digit buttons: they are used for entering digits into the display. 33[A], [B], [C], [D], [E], [F] 34Hexadecimal buttons: they are used for completing an hex number. For using these buttons, the calculator must be configured into scientific mode and the [HEX] state must be selected. 35[.] or [,] 36Decimal point: used for starting the non integer part of a decimal number. 37[+/-] 38Change sign: if it's pressed after a calculation or when entering the operands, it will change the sign of the number shown into the output display. 39[BACK] 40If the displayed number has been entered manually and it isn't a result of a calculation, you can delete the last digit by pressing this button. 41[CE] 42This button removes an incorrect number from the output display. All pending operations are preserved. 43[ C ] 44It clears the output display and all pending operations. 45 46DISPLAY FORMAT 47-------------- 48You can enter digits by pressing the buttons mentioned in the <HOW TO INPUT NUMBERS> section. 49These numbers can be entered into four different bases: hexadecimal, decimal, octal or binary system. 50A number shown into the output display can be easily converted from a numeric base to another by simply changing the base on the fly. 51 52When working with pure decimal numbers, the user can enter the numbers in two ways: 53- Normal mode: each number is entered its integer part and, eventually, its fractional part. 54- Exponential mode: the number is entered by typing a mantissa and then an exponent. This method allows you to write very big or very small numbers that you would not be able to type in a different manner. You can use it only when the calculator is configured in scientific mode. 55However, there are some limits even when you work with exponential notation. 56These limits are: 57-1.79769313486231570e+308 <= x <= -2.22507385850720140e-308 582.22507385850720140e-308 <= x <= 1.79769313486231570e+308 59The exponential input mode is activated by the [Exp] button. 60After the mantissa has been typed, by pressing this button you will be able to enter the exponent. 61When the support for GNU multi-precision libraries is activated, these limits rise greatly to 64 displayed digits for the mantissa and 8 digits for the exponent, both with sign. 62 63When the calculator is in [HEX], [OCT] or [BIN] state, it's possible to apply a masking for limiting the range of the numbers. Four range are available: 64[QWORD] 65It limits the integers to 64 bit numbers. 66[DWORD] 67It limits the integers to 32 bit numbers. 68[WORD] 69It limits the integers to 16 bit numbers. 70[BYTE] 71It limits the integers to 8 bit numbers. 72 73ERROR MESSAGE 74------------- 75The output display will show the message "Error" if the current calculation overflows the limits of the calculator, or when an undefined condition is generated (example: division by zero). 76The error condition is cleared using the [ C ] button. 77 78ARITHMETIC FUNCTIONS 79-------------------- 80ReactOS Calc implements the standard arithmetic rules with the following operators: 81[+] 82Addition 83[-] 84Subtraction 85[*] 86Multiplication 87[/] 88Division 89[Mod] 90Remainder of a division 91Those rules express the concept of priority. 92Here there is a list of priorities implemented from the highest to the lowest: 93- Special functions which change directly the current value into a new one: trigonometrics, hyperbolics, exponentials and logarithms, reciprocal, base conversions, integer and fractional part detection and change of sign. 94- Power and root functions. 95- multiplications, divisions, reminders. 96- additions, subtractions. 97- Logical functions. 98These rules may be overcome by using parentheses. 99With [(] and [)] buttons, the user can isolate a mathematical expression to be evaluated separately. The number of parentheses into a single expression is virtually unlimited. The number of currently-open parentheses is displayed in the left box underneath the base change option set. 100 101LOGICAL FUNCTIONS 102----------------- 103There is a set of logical functions which can be used between two operands. They can be used as normal arithmetic operators. 104The only exception is the "Not" operator which works on a single number. 105The provided functions are: 106[And] 107It executes an "and" between the numbers. 108[Or] 109It executes an "or" between the numbers. 110[Xor] 111It executes an "exclusive or" between the numbers. 112[Not] 113It inverts all bits of the number shown into the output display. 114 115ALGEBRAIC FUNCTIONS 116------------------- 117ReactOS Calc implements the most commonly used algebraic functions. 118[Int] 119It isolates the integer part of the number shown into the output display. 120[Inv]+[Int] 121The integer part of the number is discarded and the fractional part stays on the output display. 122[x^2] 123Square function. It calculates the square of the number shown on the output display. 124[Inv]+[x^2] 125It returns the positive square root of the number shown on the output display. 126If the current number is negative, then the error message will be displayed. 127When working with standard and conversion layouts, the [sqrt] button is a shortcut to this function. 128[x^3] 129Cube function. It calculates the cube of the number shown on the output display. 130[Inv]+[x^3] 131It returns the cube root of the number shown on the output display. 132[x^y] 133Power function. It calculates the power of X elevated to Y. 134[Inv]+[x^y] 135Root function. It calculates the Y-th root of X. 136[1/x] 137Reciprocal. It divides 1 by the number shown on the output display. 138[n!] 139Factorial. It calculates the factorial of the integer part of the number shown into the output display. 140The calculation is defined within these limits: 1410 <= n <= 170 142[ln] 143Natural logarithm. It calculates the natural logarithm of the current number. 144ReactOS Calc assumes the Nepero's constant to be: 145e=2.7182818284590452354 146The calculation is defined for x > 0. 147[Inv]+[ln] 148Natural anti-logarithm. It calculates the power of the Nepero's constant to the current number. 149[Log] 150Decimal logarithm. It calculates the logarithm of the current number to base 10. 151The calculation is defined for x > 0. 152[Inv]+[Log] 153Decimal anti-logarithm. It calculates the power of 10 to the current number. 154 155TRIGONOMETRIC FUNCTIONS 156----------------------- 157ReactOS Calc allows the calculation of three types of trigonometric functions with their inverse operations. 158These functions can be used with three different angular units of measurement: degrees, radians or gradians. 159The angular mode does not affect the non trigonometric functions. 160Please note that the degree type uses decimal degrees and not angles in the degree-minute-second form. 161The available functions are: 162[sin] 163It calculates the sine of the given angle. 164If the [Inv] modifier is activated, it finds the angle whose sine value is shown into the output display. 165[cos] 166It calculates the cosine of the given angle. 167If the [Inv] modifier is activated, it finds the angle whose cosine value is shown into the output display. 168[tan] 169It calculates the tangent of the given angle. 170If the [Inv] modifier is activated, it finds the angle whose tangent value is shown into the output display. 171 172THE PI BUTTON 173------------- 174For helping the calculations with trigonometric functions, it's possible to load the value of 'Pi' into the output display. 175The function is called by pressing the [PI] button. 176If the [Inv] modifier is activated, then the output display will be loaded with 2*PI. 177In ReactOS Calc, Pi has the value 3.14159265358979323846 178 179HYPERBOLIC FUNCTIONS 180-------------------- 181ReactOS Calc allows the calculation of three types of hyperbolic functions with their inverse operations. 182Those functions are activated by the same buttons used for trigonometric functions; the hyperbolic context is enabled by activating the [Hyp] modifier. The inverse functions are activated by the [Inv] modifier. 183[sin]+[Hyp] 184Hyperbolic sine 185[cos]+[Hyp] 186Hyperbolic cosine 187[tan]+[Hyp] 188Hyperbolic tangent 189 190STATISTICAL FUNCTIONS 191--------------------- 192By pressing the [STA] button, the statistical window is enabled. 193Statistical window allows to store groups of number and execute some common statistical operators. 194Into the statistical box, there are four buttons with these functions: 195[RET] 196It moves the focus back to the calculator. 197[LOAD] 198It loads the selected number into the output display of the calculator. 199[CD] 200It deletes the selected number from the list. 201[CAD] 202It deletes all numbers currently stored into the list. 203 204While the statistical window is shown, four additional buttons are enabled: 205[Ave] 206It calculates the arithmetic average of the numbers stored into the list. 207[Ave] + [Inv] 208It calculates the arithmetic average of the squares of the numbers stored into the list. 209[Sum] 210It calculates the sum of all numbers stored into the list. 211[Sum] + [Inv] 212It calculates the sum of the squares of all numbers stored into the list. 213[s] 214It calculates the population standard deviations with base 'n-1' of the numbers stored into the list. 215[s] + [Inv] 216It calculates the population standard deviations with base 'n' of the numbers stored into the list. 217[Dat] 218It inserts the number shown into the output display into the list. 219 220Note: when the statistical box is closed, its content is lost. 221 222MEMORY FUNCTION 223--------------- 224ReactOS Calc reserves for the user a memory region for storing data. 225With this feature, the user can store frequently used numbers (typically, these numbers are constants) and recall them at any time, without the need to re-enter them manually. 226If the memory function is currently in use, the text "M" will appear in the right box underneath the base change option set. 227The memory is preserved when switching between standard, conversion and scientific modes, but its content is lost when ReactOS Calc application is closed. 228Four keys are available with memory function support. 229[MC] 230Memory Clear: clears the content of the memory. 231[MR] 232Memory Recall: retrieves the stored data from the memory and it shows it into the output display, without affecting the content of the storage. 233[MS] 234Memory Store: stores the displayed value into the memory. The content of the display is unaffected. After pressing this button, the previous content of the memory is lost. If the [INV] modifier is activated, then this button will swap current memory value with displayed value. Under these conditions, the displayed value is stored and the previously stored quantity is shown on the output display. 235If the memory is empty, it will act as a normal store. 236[M+] 237Memory Sum: the displayed value is algebraically added to the current memory. The output display will be unchanged after this transfer and addition. If the [INV] modifier is activated, then the displayed value will be algebraically subtracted from the memory. If the memory is empty, it will work in both condition as a simple memory store. 238 239DEGREE CONVERSION 240----------------- 241With [dms] button you can convert decimal degrees into degree-minute-second format and vice-versa. 242When working with d-m-s angles, the notation used into the output display is "DDD.MMSS" where D stands for degree, M for minute and S for second. 243The [dms] button will convert decimal angles to degree-minute-second angles. 244The [dms] button with [Inv] modifier will convert degree-minute-second angles into decimal angles. 245 246FIXED SCIENTIFIC NOTATION 247------------------------- 248When working with ReactOS Calc, it is possible to select a temporary scientific notation (activated by [Exp] button) or a fixed scientific notation. 249Fixed scientific notation will be turned on by pressing [F-E] button. 250When fixed scientific notation is active, all results will be displayed with scientific notation even for small numbers. 251The calculator will be restored to normal mode by pressing [F-E] button again or by pressing the [ C ] button. 252 253PERCENT 254------- 255The [%] button is available only with standard and conversion layouts and it's used as modifier for the four basic arithmetic operators. 256The input sequence for a percent calculation is: 257"first" "operator" "second" "percent" 258The modification applied by the percent button for each operator are: 259[+] 260Add "second"-% of "first" to "first". 261[-] 262Subtract "second"-% of "first" from "first". 263[*] 264Multiply "second"-% of "first" with "first". 265[/] 266Divide "first" by "second"-% of "first". 267 268GLOSSARY 269-------- 270 271Output display 272This is the place where the typed numbers and the results of the calculations are shown. 273 274Hex 275It selects the hexadecimal numeric base and it converts the number shown into the output display. 276Shortcut from keyboard: F5 277 278Dec 279It selects the decimal numeric base and it converts the number shown into the output display. 280Shortcut from keyboard: F6 281 282Oct 283It selects the octal numeric base and it converts the number shown into the output display. 284Shortcut from keyboard: F7 285 286Bin 287It selects the binary numeric base and it converts the number shown into the output display. 288Shortcut from keyboard: F8 289 290Degrees 291It enables the processing of trigonometric functions into degree format. 292Shortcut from keyboard: F2 293 294Radians 295It enables the processing of trigonometric functions into radians format. 296Shortcut from keyboard: F3 297 298Gradians 299It enables the processing of trigonometric functions into gradians format. 300Shortcut from keyboard: F4 301 302Qword 303It limits the length of integer numbers to 64 bits. 304Shortcut from keyboard: F12 305 306Dword 307It limits the length of integer numbers to 32 bits. 308Shortcut from keyboard: F2 309 310Word 311It limits the length of integer numbers to 16 bits. 312Shortcut from keyboard: F3 313 314Byte 315It limits the length of integer numbers to 8 bits. 316Shortcut from keyboard: F4 317 318Inv 319It enables the inverse function for [sin] [cos] [tan] [pi] [x^y] [x^2] [x^3] [ln] [log] [dms] [MS] [M+] [Int] buttons. 320Shortcut from keyboard: I 321 322Hyp 323It enables the hyperbolic mode for [sin] [cos] [tan] buttons 324Shortcut from keyboard: H 325 326Back 327It deletes the last digit typed on the calculator. 328It also disables the temporary scientific mode if an exponent is removed completely. 329Shortcut from keyboard: Backspace 330 331CE 332It deletes the last typed number from the output display. 333Shortcut from keyboard: Delete 334 335_C_ 336It deletes the current calculation and all sub expressions. 337Shortcut from keyboard: ESC 338 339F-E 340It enables or it disables the fixed scientific notation. 341Shortcut from keyboard: V 342 3430 1 2 3 4 5 6 7 8 9 344These buttons are used for entering digits. 345Shortcut from keyboard: the corresponding number on the keyboard or the numeric pad. 346 347A B C D E F 348These buttons are used for entering hexadecimal numbers. 349Shortcut from keyboard: the letters from A to F. 350 351+/- 352It changes the sign of the number. 353Shortcut from keyboard: F9 354 355. or , 356It adds the decimal point for a decimal number. 357Shortcut from keyboard: , or . 358 359+ 360Addition 361Shortcut from keyboard: + 362 363- 364Subtraction 365Shortcut from keyboard: - 366 367* 368Multiplication 369Shortcut from keyboard: * 370 371/ 372Division 373Shortcut from keyboard: / 374 375= 376It resolves the current calculation and all sub expressions. 377Shortcut from keyboard: = 378 379Mod 380Remainder of an integer division. 381Shortcut from keyboard: % 382 383And 384Logical "and". 385Shortcut from keyboard: & 386 387Or 388Logical "or". 389Shortcut from keyboard: | 390 391Xor 392Logical exclusive "or". 393Shortcut from keyboard: ^ 394 395Lsh 396Logical shift to left. 397Shortcut from keyboard: < 398 399Not 400Logical bit inversion. 401Shortcut from keyboard: ~ 402 403Int 404It isolates the Integer or fractional part of a number. 405Shortcut from keyboard: ; 406 407MC 408It deletes the memory. 409Shortcut from keyboard: CTRL-L 410 411MR 412It recalls a previously stored number from the memory. 413Shortcut from keyboard: CTRL-R 414 415MS 416It stores a number into the memory and it eventually transfers the previous value to the output display. 417Shortcut from keyboard: CTRL-M 418 419M+ 420It adds or it subtracts the value into the output display to the memory. 421Shortcut from keyboard: CTRL-P 422 423pi 424It loads the pi or 2*pi value into the output display. 425Shortcut from keyboard: P 426 427( 428It starts a new sub expression. 429Shortcut from keyboard: ( 430 431) 432It closes and it resolves a sub expression. 433Shortcut from keyboard: ) 434 435dms 436It converts a decimal degree to a decimal-minute-second degree and viceversa. 437Shortcut from keyboard: M 438 439Exp 440It enables the temporary scientific notation. 441Shortcut from keyboard: X 442 443ln 444It calculates the natural logarithm. Natural anti logarithm calculation is activated by Inv modifier. 445Shortcut from keyboard: N 446 447Log 448It calculates the decimal logarithm. Decimal anti logarithm calculation is activated by Inv modifier. 449Shortcut from keyboard: L 450 451n! 452It calculates the factorial of a number. 453Shortcut from keyboard: ! 454 4551/x 456It calculates the reciprocal of a number. 457Shortcut from keyboard: R 458 459sin 460It calculates the sine, hyperbolic sine, arcsine or the hyperbolic arcsine of an angle. 461Shortcut from keyboard: S 462 463cos 464It calculates the cosine, hyperbolic cosine, arcsine or the hyperbolic arccosine of an angle. 465Shortcut from keyboard: O 466 467tan 468It calculates the tangent, hyperbolic tangent, arcstangent or the hyperbolic arctangent of an angle. 469Shortcut from keyboard: T 470 471x^y 472It calculates the power of X to Y. 473With the Inv modifier, it calculates the Yth root of X. 474Shortcut from keyboard: Y 475 476x^2 477It calculates the square of X. 478With the Inv modifier, it calculates the square root of X. 479Shortcut from keyboard: @ 480 481x^3 482It calculates the cube of X. 483With the Inv modifier, it calculates the cubic root of X. 484Shortcut from keyboard: $ 485 486Sta 487It enables the statistical window and its functions. 488Shortcut from keyboard: CTRL-S 489 490Ave 491It calculates the arithmetic average of the numbers stored into the statistical box. 492When used with [Inv] modifier it calculates the average of squares. 493Shortcut from keyboard: CTRL-A 494 495Sum 496It calculates the sum of the numbers stored into the statistical box. 497When used with [Inv] modifier it calculates the summation of squares. 498Shortcut from keyboard: CTRL-T 499 500s 501It calculates the standard deviation of the numbers stores into the statistical box. 502Shortcut from keyboard: CTRL-D 503 504Dat 505It inserts a new number into the statistical box 506Shortcut from keyboard: Insert 507 508% 509It executes the calculation with percent mode. 510Shortcut from keyboard: % 511 512sqrt 513It calculates the square root of a number. 514Shortcut from keyboard: @ 515