home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / info / calc.info-2 (.txt) < prev    next >
GNU Info File  |  1994-12-22  |  40KB  |  685 lines

  1. This is Info file calc.info, produced by Makeinfo-1.55 from the input
  2. file calc.texinfo.
  3.    This file documents Calc, the GNU Emacs calculator.
  4.    Copyright (C) 1990, 1991 Free Software Foundation, Inc.
  5.    Permission is granted to make and distribute verbatim copies of this
  6. manual provided the copyright notice and this permission notice are
  7. preserved on all copies.
  8.    Permission is granted to copy and distribute modified versions of
  9. this manual under the conditions for verbatim copying, provided also
  10. that the section entitled "GNU General Public License" is included
  11. exactly as in the original, and provided that the entire resulting
  12. derived work is distributed under the terms of a permission notice
  13. identical to this one.
  14.    Permission is granted to copy and distribute translations of this
  15. manual into another language, under the above conditions for modified
  16. versions, except that the section entitled "GNU General Public License"
  17. may be included in a translation approved by the author instead of in
  18. the original English.
  19. File: calc.info,  Node: History and Acknowledgements,  Prev: Using Calc,  Up: Getting Started
  20. History and Acknowledgements
  21. ============================
  22. Calc was originally started as a two-week project to occupy a lull in
  23. the author's schedule.  Basically, a friend asked if I remembered the
  24. value of `2^32'.  I didn't offhand, but I said, "that's easy, just call
  25. up an `xcalc'."  `Xcalc' duly reported that the answer to our question
  26. was `4.294967e+09'--with no way to see the full ten digits even though
  27. we knew they were there in the program's memory!  I was so annoyed, I
  28. vowed to write a calculator of my own, once and for all.
  29.    I chose Emacs Lisp, a) because I had always been curious about it
  30. and b) because, being only a text editor extension language after all,
  31. Emacs Lisp would surely reach its limits long before the project got
  32. too far out of hand.
  33.    To make a long story short, Emacs Lisp turned out to be a
  34. distressingly solid implementation of Lisp, and the humble task of
  35. calculating turned out to be more open-ended than one might have
  36. expected.
  37.    Emacs Lisp doesn't have built-in floating point math, so it had to be
  38. simulated in software.  In fact, Emacs integers will only comfortably
  39. fit six decimal digits or so--not enough for a decent calculator.  So I
  40. had to write my own high-precision integer code as well, and once I had
  41. this I figured that arbitrary-size integers were just as easy as large
  42. integers.  Arbitrary floating-point precision was the logical next step.
  43. Also, since the large integer arithmetic was there anyway it seemed only
  44. fair to give the user direct access to it, which in turn made it
  45. practical to support fractions as well as floats.  All these features
  46. inspired me to look around for other data types that might be worth
  47. having.
  48.    Around this time, my friend Rick Koshi showed me his nifty new HP-28
  49. calculator.  It allowed the user to manipulate formulas as well as
  50. numerical quantities, and it could also operate on matrices.  I decided
  51. that these would be good for Calc to have, too.  And once things had
  52. gone this far, I figured I might as well take a look at serious algebra
  53. systems like Mathematica, Macsyma, and Maple for further ideas.  Since
  54. these systems did far more than I could ever hope to implement, I
  55. decided to focus on rewrite rules and other programming features so
  56. that users could implement what they needed for themselves.
  57.    Rick complained that matrices were hard to read, so I put in code to
  58. format them in a 2D style.  Once these routines were in place, Big mode
  59. was obligatory.  Gee, what other language modes would be useful?
  60.    Scott Hemphill and Allen Knutson, two friends with a strong
  61. mathematical bent, contributed ideas and algorithms for a number of
  62. Calc features including modulo forms, primality testing, and
  63. float-to-fraction conversion.
  64.    Units were added at the eager insistence of Mass Sivilotti.  Later,
  65. Ulrich Mueller at CERN and Przemek Klosowski at NIST provided invaluable
  66. expert assistance with the units table.  As far as I can remember, the
  67. idea of using algebraic formulas and variables to represent units dates
  68. back to an ancient article in Byte magazine about muMath, an early
  69. algebra system for microcomputers.
  70.    Many people have contributed to Calc by reporting bugs and suggesting
  71. features, large and small.  A few deserve special mention:  Tim Peters,
  72. who helped develop the ideas that led to the selection commands, rewrite
  73. rules, and many other algebra features; Francois Pinard, who contributed
  74. an early prototype of the Calc Summary appendix as well as providing
  75. valuable suggestions in many other areas of Calc; Carl Witty, whose
  76. eagle eyes discovered many typographical and factual errors in the Calc
  77. manual; Tim Kay, who drove the development of Embedded mode; Ove
  78. Ewerlid, who made many suggestions relating to the algebra commands and
  79. contributed some code for polynomial operations; Randal Schwartz, who
  80. suggested the `calc-eval' function; Robert J. Chassell, who suggested
  81. the Calc Tutorial and exercises; and Juha Sarlin, who first worked out
  82. how to split Calc into quickly-loading parts.  Bob Weiner helped
  83. immensely with the Lucid Emacs port.
  84.    Among the books used in the development of Calc were Knuth's *Art of
  85. Computer Programming* (especially volume II, *Seminumerical
  86. Algorithms*); *Numerical Recipes* by Press, Flannery, Teukolsky, and
  87. Vetterling; Bevington's *Data Reduction and Error Analysis for the
  88. Physical Sciences*; *Concrete Mathematics* by Graham, Knuth, and
  89. Patashnik; Steele's *Common Lisp, the Language*; the *CRC Standard Math
  90. Tables* (William H. Beyer, ed.); and Abramowitz and Stegun's venerable
  91. *Handbook of Mathematical Functions*.  I consulted the user's manuals
  92. for the HP-28 and HP-48 calculators, as well as for the programs
  93. Mathematica, SMP, Macsyma, Maple, MathCAD, Gnuplot, and others.  Also,
  94. of course, Calc could not have been written without the excellent *GNU
  95. Emacs Lisp Reference Manual*, by Bil Lewis and Dan LaLiberte.
  96.    Final thanks go to Richard Stallman, without whose fine
  97. implementations of the Emacs editor, language, and environment, Calc
  98. would have been finished in two weeks.
  99. File: calc.info,  Node: Interactive Tutorial,  Up: Top
  100. Tutorial
  101. ********
  102. Some brief instructions on using the Emacs Info system for this
  103. tutorial:
  104.    Press the space bar and Delete keys to go forward and backward in a
  105. section by screenfuls (or use the regular Emacs scrolling commands for
  106. this).
  107.    Press `n' or `p' to go to the Next or Previous section.  If the
  108. section has a "menu", press a digit key like `1' or `2' to go to a
  109. sub-section from the menu.  Press `u' to go back up from a sub-section
  110. to the menu it is part of.
  111.    Exercises in the tutorial all have cross-references to the
  112. appropriate page of the "answers" section.  Press `f', then the
  113. exercise number, to see the answer to an exercise.  After you have
  114. followed a cross-reference, you can press the letter `l' to return to
  115. where you were before.
  116.    You can press `?' at any time for a brief summary of Info commands.
  117.    Press `1' now to enter the first section of the Tutorial.
  118. * Menu:
  119. * Tutorial::
  120. File: calc.info,  Node: Tutorial,  Next: Introduction,  Prev: Getting Started,  Up: Top
  121. Tutorial
  122. ********
  123. This chapter explains how to use Calc and its many features, in a
  124. step-by-step, tutorial way.  You are encouraged to run Calc and work
  125. along with the examples as you read (*note Starting Calc::.).  If you
  126. are already familiar with advanced calculators, you may wish to skip on
  127. to the rest of this manual.
  128.    This tutorial describes the standard user interface of Calc only.
  129. The "Quick Mode" and "Keypad Mode" interfaces are fairly
  130. self-explanatory.  *Note Embedded Mode::, for a description of the
  131. "Embedded Mode" interface.
  132.    The easiest way to read this tutorial on-line is to have two windows
  133. on your Emacs screen, one with Calc and one with the Info system.  (If
  134. you have a printed copy of the manual you can use that instead.)  Press
  135. `M-# c' to turn Calc on or to switch into the Calc window, and press
  136. `M-# i' to start the Info system or to switch into its window.  Or, you
  137. may prefer to use the tutorial in printed form.
  138.    This