|
|
1.1 ! root 1: .TH XCALC 1 "16 March 1987" "X Version 10" ! 2: .SH NAME ! 3: xcalc \- X based scientific calculator ! 4: .SH SYNOPSIS ! 5: .B xcalc ! 6: [host:display] [-bw <pixels>] [-stip] [-rv] [-rpn] [-analog] [=geometry] ! 7: .SH DESCRIPTION ! 8: .I Xcalc ! 9: is a program that brings up a scientific calculator desk accessory. The ! 10: calculator mode should remind you more than a little bit of the TI-30 or ! 11: HP-10C. ! 12: .SH OPTIONS ! 13: .PP ! 14: .TP 14 ! 15: .B \-bw ! 16: The border width in pixels ! 17: .PP ! 18: .TP 14 ! 19: .B \-stip ! 20: Sets the 'stipple' option. See 'defaults'. ! 21: .PP ! 22: .TP 14 ! 23: .B \-rv ! 24: Reverse video (on monochrom displays). ! 25: .PP ! 26: .TP 14 ! 27: .B \-rpn ! 28: Specifies Reverse Polish Notation mode, in which the calculator behaves like ! 29: an HP-10 calculator. Without this flag, it will behave like a TI-30 ! 30: calculator. ! 31: .PP ! 32: .TP 14 ! 33: .B \-analog ! 34: For backwards compatability. Try it. ! 35: .PP ! 36: .TP 14 ! 37: .B \=geometry ! 38: The width and height shouldn't be set by the user, as the default size is also ! 39: the minimum size, and anything larger than that won't be 'right'. You can, ! 40: however feel free to set the position. ! 41: .PP ! 42: .TP 14 ! 43: .B \fIhost\fP:\fIdisplay\fP ! 44: Normally, ! 45: .I xcalc ! 46: gets the host and display number to use from the environment variable ! 47: ``DISPLAY''. One can, however specify them explicitly. ! 48: The ! 49: .I host ! 50: specifies which machine to create the ! 51: .I xcalc ! 52: window on, and ! 53: the ! 54: .I display ! 55: argument specifies the display number. ! 56: .SH OPERATION ! 57: .PP ! 58: .I Mouse Operation: ! 59: The left button is the only one (really) used to operate the calculator. ! 60: Pressing the AC key with the right button terminates the calculator. ! 61: .PP ! 62: .I Key Usage (Normal mode): ! 63: The number keys, the +/- key, and the +, -, *, /, and = keys all do exactly ! 64: what you would expect them to. It should be noted that the operators obey ! 65: the standard rules of precedence. Thus, entering "3+4*5=" results in "23", ! 66: not "35". The parentheses can be used to override this. For example, ! 67: "(1+2+3)*(4+5+6)=" results in "6*15=90". The non-obvious keys are detailed ! 68: below. ! 69: .PP ! 70: .B 1/x ! 71: replaces the number in the display with its reciprocal. ! 72: .PP ! 73: .B x^2 ! 74: squares the number in the display. ! 75: .PP ! 76: .B SQRT ! 77: takes the square root of the number in the display. ! 78: .PP ! 79: .B CE/C ! 80: when pressed once, clears the number in the display without clearing the state ! 81: of the machine. Allows you to re-enter a number if you screw it up. ! 82: Pressing it twice clears the state, also. ! 83: .PP ! 84: .B AC ! 85: clears everything, the display, the state, the memory, everything. Pressing ! 86: it with the right button 'turns off' the calculator, in that it exits the ! 87: program. Somewhat more equivalent to throwing the calculator in the trash, ! 88: if we were to pursue the analogy. ! 89: .PP ! 90: .B INV ! 91: inverts the meaning of the function keys. See the individual function keys ! 92: for details. ! 93: .PP ! 94: .B sin ! 95: computes the sine of the number in the display, as interpreted by the current ! 96: DRG mode (see DRG, below). If inverted, computes the arcsine. ! 97: .PP ! 98: .B cos ! 99: computes the cosine, or arccosine when inverted. ! 100: .PP ! 101: .B tan ! 102: computes the tangent, or arctangent when inverted. ! 103: .PP ! 104: .B DRG ! 105: changes the DRG mode, as indicated by 'DEG', 'RAD', or 'GRAD' at the bottom of ! 106: the display. When in 'DEG' mode, numbers in the display are taken as being ! 107: degrees. In 'RAD' mode, numbers are in radians, and in 'GRAD' mode, numbers ! 108: are in gradians. When inverted, the DRG key has the nifty feature of ! 109: converting degrees to radians to gradians and vice-versa. Example: put the ! 110: calculator into 'DEG' mode, and type "45 INV DRG". The display should now ! 111: show something along the lines of ".785398", which is 45 degrees converted to ! 112: radians. ! 113: .PP ! 114: .B e ! 115: the constant 'e'. (2.7182818...) ! 116: .PP ! 117: .B EE ! 118: used for entering exponential numbers. For example, to enter "-2.3E-4" you'd ! 119: type "2 . 3 +/- EE 4 +/-" ! 120: .PP ! 121: .B log ! 122: calculates the log (base 10) of the number in the display. When inverted, ! 123: raises "10.0" to the number in the display. For example, typing "3 INV log" ! 124: should result in "1000". ! 125: .PP ! 126: .B ln ! 127: calcuates the log (base e) of the number in the display. When inverted, ! 128: raises "e" to the number in the display. For example, typing "e ln" should ! 129: result in "1" ! 130: .PP ! 131: .B y^x ! 132: raises the number on the left to the power of the number on the right. For ! 133: example "2 y^x 3 =" results in "8", which is 2^3. For a further example, ! 134: "(1+2+3) y^x (1+2) =" equals "6 y^x 3" which equals "216". ! 135: .PP ! 136: .B PI ! 137: the constant 'pi'. (3.1415927....) ! 138: .PP ! 139: .B x! ! 140: computes the factorial of the number in the display. The number in the display ! 141: must be an integer in the range 0-500, though, depending on your math library, ! 142: it might overflow long before that. ! 143: .PP ! 144: .B STO ! 145: copies the number in the display to the memory location. ! 146: .PP ! 147: .B RCL ! 148: copies the number from the memory location to the display. ! 149: .PP ! 150: .B SUM ! 151: adds the number in the display to the number in the memory location. ! 152: .PP ! 153: .B EXC ! 154: swaps the number in the display with the number in the memory location. ! 155: .PP ! 156: .I Key Usage (RPN mode): ! 157: The number keys, CHS (change sign), +, -, *, /, and ENTR keys all do exactly ! 158: what you would expect them to. Many of the remaining keys are the same as in ! 159: normal mode. The differences are detailed below. ! 160: .PP ! 161: .B <- ! 162: is a backspace key that can be used while typing a number. It will erase ! 163: digits from the display. ! 164: .PP ! 165: .B ON ! 166: clears everything, the display, the state, the memory, everything. Pressing ! 167: it with the right button 'turns off' the calculator, in that it exits the ! 168: program. Somewhat more equivalent to throwing the calculator in the trash, ! 169: if we were to pursue the analogy. ! 170: .PP ! 171: .B INV ! 172: inverts the meaning of the function keys. This would be the "f" key ! 173: on an HP calculator, but xcalc does not have the resolution to display ! 174: multiple legends on each key. See the individual function keys ! 175: for details. ! 176: .PP ! 177: .B 10^x ! 178: raises "10.0" to the number in the top of the stack. When inverted, calculates ! 179: the log (base 10) of the number in the display. ! 180: .PP ! 181: .B e^x ! 182: raises "e" to the number in the top of the stack. When inverted, calcuates the ! 183: log (base e) of the number in the display. ! 184: .PP ! 185: .B STO ! 186: copies the number in the top of the stack to a memory location. There are 10 ! 187: memory locations. The desired memory is specified by following this ! 188: key with pressing a digit key. ! 189: .PP ! 190: .B RCL ! 191: pushes the number from the specified memory location onto the stack. ! 192: .PP ! 193: .B SUM ! 194: adds the number on top of the stack to the number in the specified ! 195: memory location. ! 196: .PP ! 197: .B x:y ! 198: exchanges the numbers in the top two stack positions. ! 199: .PP ! 200: .B R v ! 201: rolls the stack downward. When inverted, rolls the stack upward. ! 202: .PP ! 203: .I blank ! 204: these keys were used for programming functions on the HP11-C. Their ! 205: functionality has not been duplicated here. ! 206: .PP ! 207: .SH KEYBOARD EQUIVALENTS ! 208: If you have the mouse in the xcalc window, you can use the keyboard to speed ! 209: entry, as almost all of the calculator keys have a keyboard equivalent. The ! 210: number keys, the operator keys, and the parentheses all have the obvious ! 211: equivalent. The less-obvious equivalents are as follows: ! 212: .PP ! 213: .EX ! 214: n: +/- !: x! ! 215: p: PI e: EE ! 216: l: ln ^: y^x ! 217: i: INV s: sin ! 218: c: cos t: tan ! 219: d: DRG BS, DEL: CE/C ("<-" in RPN mode) ! 220: CR: ENTR ! 221: ! 222: .SH COLOR USAGE ! 223: .I Xcalc ! 224: uses a lot of colors, given the opportunity. In the default case, it will ! 225: just use two colors (Foreground and Background) for everything. This works out ! 226: nicely. However, if you're a color fanatic you can specify the colors used ! 227: for the number keys, the operator (+-*/=) keys, the function keys, the display, ! 228: and the icon. ! 229: .SH X DEFAULTS ! 230: .PP ! 231: .TP 8 ! 232: .B BorderWidth ! 233: width of border. Default is '2'. ! 234: .PP ! 235: .TP 8 ! 236: .B ReverseVideo ! 237: reverses colors on monochrome displays ! 238: .PP ! 239: .TP 8 ! 240: .B Stipple ! 241: makes the calculator background a 50% stipple. Default is 'on' on ! 242: monochrome displays, 'off' on color displays. ! 243: .PP ! 244: .TP 8 ! 245: .B Mode ! 246: sets the default mode. Values are "rpn", "analog". ! 247: .PP ! 248: .TP 8 ! 249: .B Foreground ! 250: the default color used for borders and text. ! 251: .PP ! 252: .TP 8 ! 253: .B Background ! 254: the default color used for the background. ! 255: .B NKeyFore, NKeyBack ! 256: the colors used for the number keys. ! 257: .PP ! 258: .TP 8 ! 259: .B OKeyFore, OKeyBack ! 260: the colors used for the operator keys. ! 261: .PP ! 262: .TP 8 ! 263: .B FKeyFore, FKeyBack ! 264: the colors used for the function keys. ! 265: .B DispFore, DispBack ! 266: the colors used for the display. ! 267: .B IconFore, IconBack ! 268: the colors used for the icon. ! 269: .SH SAMPLE .XDEFAULTS ENTRY ! 270: If you're running on a monochrome display, you shouldn't need any .Xdefaults ! 271: entries for xcalc. On a color display, you might want to try the ! 272: following in normal mode: ! 273: ! 274: .EX ! 275: xcalc.Foreground: Black ! 276: xcalc.Background: LightSteelBlue ! 277: xcalc.NKeyFore: Black ! 278: xcalc.NKeyBack: White ! 279: xcalc.OKeyFore: Aquamarine ! 280: xcalc.OKeyBack: DarkSlateGray ! 281: xcalc.FKeyFore: White ! 282: xcalc.FKeyBack: #900 ! 283: xcalc.DispFore: Yellow ! 284: xcalc.DispBack: #777 ! 285: xcalc.IconFore: Red ! 286: xcalc.IconBack: White ! 287: ! 288: <well, *I* like them.> ! 289: .SH BUGS ! 290: Well, it would be really nice if you could (usefully) rescale the calculator, ! 291: and the redraw of the keys is sort of slow. Nothing fatal though, I think. ! 292: ! 293: The analog mode stuff isn't really working yet under X11. ! 294: .SH AUTHOR ! 295: John Bradley, University of Pennsylvania ! 296: ! 297: ([email protected]) ! 298: ! 299: RPN and analog modes added by Mark Rosenstein, MIT Project Athena ! 300: ! 301: <[email protected]>
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.