home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume26 / gnucalc / patch01 next >
Text File  |  1991-11-25  |  58KB  |  1,597 lines

  1. Newsgroups: comp.sources.misc
  2. From: daveg@synaptics.com (David Gillespie)
  3. Subject:  v26i068:  gnucalc - GNU Emacs Calculator, Patch01
  4. Message-ID: <1991Nov26.032130.29517@sparky.imd.sterling.com>
  5. X-Md4-Signature: 02c138808c750dc841b38a3b691ec542
  6. Date: Tue, 26 Nov 1991 03:21:30 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: daveg@synaptics.com (David Gillespie)
  10. Posting-number: Volume 26, Issue 68
  11. Archive-name: gnucalc/patch01
  12. Environment: Emacs
  13. Patch-To: gnucalc: Volume 24, Issue 49-104
  14.  
  15. The following patches convert Calc version 2.00 into Calc
  16. version 2.01.  To apply them automatically with Patch v2.0,
  17. first cd into your Calc distribution directory, then execute
  18. "patch < calc.patch", where "calc.patch" is the name of this file.
  19.  
  20. A list of changes appears at the end of the README file.  Several
  21. bugs that prevented Calc from being installed or loaded on certain
  22. systems have been fixed.  A few other bugs have been fixed, and one
  23. new feature (some commands for manipulating percentages) has been
  24. introduced.
  25.  
  26. Patches and complete tar files are also available for anonymous FTP
  27. from csvax.cs.caltech.edu [131.215.131.131], in the "pub" subdirectory.
  28.  
  29. Enjoy!
  30.                                                         -- Dave
  31.  
  32. Dave Gillespie
  33. daveg@synaptics.com (or daveg@csvax.cs.caltech.edu)
  34.  
  35.  
  36. *** README    Sun Oct 27 14:57:27 1991
  37. --- ../dist/README    Thu Nov 21 23:23:16 1991
  38. ***************
  39. *** 1,5 ****
  40.   
  41. ! This directory contains version 2.00 of Calc, an advanced desk
  42.   calculator for GNU Emacs.
  43.   
  44.   "Calc"  Copyright 1990, 1991  Free Software Foundation, Inc.
  45. --- 1,5 ----
  46.   
  47. ! This directory contains version 2.01 of Calc, an advanced desk
  48.   calculator for GNU Emacs.
  49.   
  50.   "Calc"  Copyright 1990, 1991  Free Software Foundation, Inc.
  51. ***************
  52. *** 53,65 ****
  53.   
  54.   To install Calc:
  55.   
  56. !   1. Type "uncompress calc-2.00.tar.Z"
  57.   
  58. !   2. Type "tar xvf calc-2.00.tar"
  59.   
  60. ! 1,2. Alternatively: "zcat calc-2.00.tar.Z | tar xvf -"
  61.   
  62. !   3. Note that the Calc tar file now creates a "calc-2.00" subdirectory
  63.        of the current directory in which to place its files.
  64.   
  65.     4. Follow the instructions in the file "INSTALL".
  66. --- 53,65 ----
  67.   
  68.   To install Calc:
  69.   
  70. !   1. Type "uncompress calc-2.01.tar.Z"
  71.   
  72. !   2. Type "tar xvf calc-2.01.tar"
  73.   
  74. ! 1,2. Alternatively: "zcat calc-2.01.tar.Z | tar xvf -"
  75.   
  76. !   3. Note that the Calc tar file now creates a "calc-2.01" subdirectory
  77.        of the current directory in which to place its files.
  78.   
  79.     4. Follow the instructions in the file "INSTALL".
  80. ***************
  81. *** 69,75 ****
  82.   Calc is written entirely in Emacs Lisp, for maximum portability.
  83.   You do not need to recompile Emacs to install and use Calc.
  84.   
  85. ! You will need about eight megabytes of disk space to install Calc
  86.   and its Info documentation.
  87.   
  88.   See the file INSTALL for installation instructions.  The instructions
  89. --- 69,75 ----
  90.   Calc is written entirely in Emacs Lisp, for maximum portability.
  91.   You do not need to recompile Emacs to install and use Calc.
  92.   
  93. ! You will need about six megabytes of disk space to install Calc
  94.   and its Info documentation.
  95.   
  96.   See the file INSTALL for installation instructions.  The instructions
  97. ***************
  98. *** 90,96 ****
  99.   
  100.   The latest Calc tar files and patches are always available for anonymous
  101.   FTP on csvax.cs.caltech.edu [131.215.131.131].  Look in the "pub"
  102. ! subdirectory.  Calc may also be available soon on prep.ai.mit.edu.
  103.   
  104.   Thanks,
  105.   
  106. --- 90,97 ----
  107.   
  108.   The latest Calc tar files and patches are always available for anonymous
  109.   FTP on csvax.cs.caltech.edu [131.215.131.131].  Look in the "pub"
  110. ! subdirectory.  Calc is also available on prep.ai.mit.edu, and in the
  111. ! archives of the comp.sources.misc Usenet group.
  112.   
  113.   Thanks,
  114.   
  115. ***************
  116. *** 104,109 ****
  117. --- 105,137 ----
  118.   ------- -- ------- --  ----
  119.   
  120.   
  121. + Version 2.01:
  122. +  * Added percentage commands `M-%', `b %', and `c %'.
  123. +  * Changed Big mode to force radix-10 in superscripts.
  124. +  * Improved display of fractions in various language modes.
  125. +  * Changed `a n' to work properly with equations and inequalities.
  126. +  * The problem with cross references to Index nodes in TeX has been fixed.
  127. +  * Fixed a bug where recursive esc-maps make calc-ext/-aent unloadable.
  128. +  * Fixed a bug in `M-# k', then `OFF' right away, with fresh Emacs.
  129. +  * Fixed a bug in which "S_i_j" was formatted wrong after `j s'.
  130. +  * Fixed a bug in which `h k u c' positioned cursor on wrong line.
  131. +  * Fixed a bug where `z ?' crashed if `z %' was defined.
  132. +  * Fixed a bug in `j O' (calc-select-once-maybe).
  133. +  * Fixed "make private" not to ask "Delete excess versions" and crash.
  134.   Version 2.00:
  135.   
  136.    * First complete posting of Calc since 1.01.
  137. *** INSTALL    Sun Oct 27 14:57:28 1991
  138. --- ../dist/INSTALL    Thu Nov 21 23:23:17 1991
  139. ***************
  140. *** 2,8 ****
  141.   Installation
  142.   ************
  143.   
  144. ! Calc 2.00 comes as a set of GNU Emacs Lisp files, with names like
  145.   `calc.el' and `calc-ext.el', and also as a `calc.texinfo' file which
  146.   can be used to generate both on-line and printed documentation.
  147.   
  148. --- 2,8 ----
  149.   Installation
  150.   ************
  151.   
  152. ! Calc 2.01 comes as a set of GNU Emacs Lisp files, with names like
  153.   `calc.el' and `calc-ext.el', and also as a `calc.texinfo' file which
  154.   can be used to generate both on-line and printed documentation.
  155.   
  156. ***************
  157. *** 142,150 ****
  158.      Unless you have installed the Calc files in Emacs' main `lisp/'
  159.   directory, you will also have to add a command that looks like the
  160.   following to tell Emacs where to find them.  In this example, we have
  161. ! put the files in directory `/usr/gnu/src/calc-2.00'.
  162.   
  163. !      (setq load-path (append load-path (list "/usr/gnu/src/calc-2.00")))
  164.   
  165.   The `make public' and `make private' commands also do this (they use
  166.   the then-current directory as the name to add to the path).  If you
  167. --- 142,150 ----
  168.      Unless you have installed the Calc files in Emacs' main `lisp/'
  169.   directory, you will also have to add a command that looks like the
  170.   following to tell Emacs where to find them.  In this example, we have
  171. ! put the files in directory `/usr/gnu/src/calc-2.01'.
  172.   
  173. !      (setq load-path (append load-path (list "/usr/gnu/src/calc-2.01")))
  174.   
  175.   The `make public' and `make private' commands also do this (they use
  176.   the then-current directory as the name to add to the path).  If you
  177. ***************
  178. *** 187,198 ****
  179.   `autoload' command for `calc-dispatch'.  If that name included
  180.   directory information, Calc adds that directory to the `load-path':
  181.   
  182. !      (autoload 'calc-dispatch "calc-2.00/calc" "Calculator" t)
  183.   
  184.   Suppose the directory `/usr/gnu/src/emacs/lisp' is on the path, and
  185.   the above `autoload' allows Emacs to find Calc under the name
  186. ! `/usr/gnu/src/emacs/lisp/calc-2.00/calc.elc'.  Then when Calc starts
  187. ! up it will add `/usr/gnu/src/emacs/lisp/calc-2.00' to the path so that
  188.   it will later be able to find its component files.
  189.   
  190.      If the above strategy does not locate the component files, Calc
  191. --- 187,198 ----
  192.   `autoload' command for `calc-dispatch'.  If that name included
  193.   directory information, Calc adds that directory to the `load-path':
  194.   
  195. !      (autoload 'calc-dispatch "calc-2.01/calc" "Calculator" t)
  196.   
  197.   Suppose the directory `/usr/gnu/src/emacs/lisp' is on the path, and
  198.   the above `autoload' allows Emacs to find Calc under the name
  199. ! `/usr/gnu/src/emacs/lisp/calc-2.01/calc.elc'.  Then when Calc starts
  200. ! up it will add `/usr/gnu/src/emacs/lisp/calc-2.01' to the path so that
  201.   it will later be able to find its component files.
  202.   
  203.      If the above strategy does not locate the component files, Calc
  204. ***************
  205. *** 313,319 ****
  206.   copy if you really need it.  To print the manual, you will need the
  207.   TeX typesetting program (this is a free program by Donald Knuth at
  208.   Stanford University) as well as the `texindex' program and
  209. ! `texinfo.tex' file that come with GNU Emacs.
  210.   
  211.      To print the Calc manual in one huge 550 page tome, type `make tex'. 
  212.   This will take care of running the manual through TeX twice so that
  213. --- 313,320 ----
  214.   copy if you really need it.  To print the manual, you will need the
  215.   TeX typesetting program (this is a free program by Donald Knuth at
  216.   Stanford University) as well as the `texindex' program and
  217. ! `texinfo.tex' file, both of which can be obtained from the FSF under
  218. ! the name `texinfo2'.
  219.   
  220.      To print the Calc manual in one huge 550 page tome, type `make tex'. 
  221.   This will take care of running the manual through TeX twice so that
  222. *** Makefile    Sun Oct 27 14:57:28 1991
  223. --- ../dist/Makefile    Thu Nov 21 23:23:17 1991
  224. ***************
  225. *** 1,7 ****
  226. ! # Makefile for "Calc 2.00", the GNU Emacs Calculator.
  227.   #  Copyright (C) 1991 Free Software Foundation.
  228.   #  Author: Dave Gillespie.
  229. ! #  Author's address: daveg@csvax.caltech.edu; 256-80 Caltech/Pasadena CA 91125.
  230.   
  231.   # This program is free software; you can redistribute it and/or modify
  232.   # it under the terms of the GNU General Public License as published by
  233. --- 1,7 ----
  234. ! # Makefile for "Calc 2.01", the GNU Emacs Calculator.
  235.   #  Copyright (C) 1991 Free Software Foundation.
  236.   #  Author: Dave Gillespie.
  237. ! #  Author's address: daveg@synaptics.com; 256-80 Caltech/Pasadena CA 91125.
  238.   
  239.   # This program is free software; you can redistribute it and/or modify
  240.   # it under the terms of the GNU General Public License as published by
  241. *** calc.el    Sun Oct 27 14:57:29 1991
  242. --- ../dist/calc.el    Thu Nov 21 23:24:10 1991
  243. ***************
  244. *** 1,4 ****
  245. ! ;; Calculator for GNU Emacs version 2.00, part I
  246.   ;; Copyright (C) 1990, 1991 Free Software Foundation, Inc.
  247.   ;; Written by Dave Gillespie, daveg@csvax.cs.caltech.edu.
  248.   
  249. --- 1,4 ----
  250. ! ;; Calculator for GNU Emacs version 2.01, part I
  251.   ;; Copyright (C) 1990, 1991 Free Software Foundation, Inc.
  252.   ;; Written by Dave Gillespie, daveg@csvax.cs.caltech.edu.
  253.   
  254. ***************
  255. *** 674,681 ****
  256.     (put 'math-underflow 'error-conditions '(error math-underflow calc-error))
  257.     (put 'math-underflow 'error-message "Floating-point underflow occurred")
  258.     
  259. !   (setq calc-version "2.00"
  260. !     calc-version-date "Sat Oct 26 17:36:38 PDT 1991"
  261.       calc-trail-pointer nil        ; "Current" entry in trail buffer.
  262.           calc-trail-overlay nil        ; Value of overlay-arrow-string.
  263.       calc-was-split nil        ; Had multiple windows before Calc.
  264. --- 674,681 ----
  265.     (put 'math-underflow 'error-conditions '(error math-underflow calc-error))
  266.     (put 'math-underflow 'error-message "Floating-point underflow occurred")
  267.     
  268. !   (setq calc-version "2.01"
  269. !     calc-version-date "Thu Nov 21 23:23:17 PST 1991"
  270.       calc-trail-pointer nil        ; "Current" entry in trail buffer.
  271.           calc-trail-overlay nil        ; Value of overlay-arrow-string.
  272.       calc-was-split nil        ; Had multiple windows before Calc.
  273. ***************
  274. *** 1991,1997 ****
  275.           (calc-prev-char nil)
  276.           (calc-prev-prev-char nil)
  277.           (calc-buffer (current-buffer))
  278. !         (buf (read-from-minibuffer "Calc: " "" calc-digit-map)))
  279.          (or calc-digit-value (setq calc-digit-value (math-read-number buf)))
  280.          (if (stringp calc-digit-value)
  281.          (calc-alg-entry calc-digit-value)
  282. --- 1991,2002 ----
  283.           (calc-prev-char nil)
  284.           (calc-prev-prev-char nil)
  285.           (calc-buffer (current-buffer))
  286. !         (old-esc (aref global-map 27))
  287. !         (buf (unwind-protect
  288. !              (progn
  289. !                (aset global-map 27 nil)
  290. !                (read-from-minibuffer "Calc: " "" calc-digit-map))
  291. !            (aset global-map 27 old-esc))))
  292.          (or calc-digit-value (setq calc-digit-value (math-read-number buf)))
  293.          (if (stringp calc-digit-value)
  294.          (calc-alg-entry calc-digit-value)
  295. ***************
  296. *** 2019,2025 ****
  297.       (calc-temp-minibuffer-message " [Bad format]"))
  298.       (or (memq last-command-char '(32 13))
  299.       (setq prefix-arg current-prefix-arg
  300. !           unread-command-char last-command-char))
  301.       (exit-minibuffer))
  302.   )
  303.   
  304. --- 2024,2033 ----
  305.       (calc-temp-minibuffer-message " [Bad format]"))
  306.       (or (memq last-command-char '(32 13))
  307.       (setq prefix-arg current-prefix-arg
  308. !           unread-command-char (if (and (eq last-command-char 27)
  309. !                        (>= last-input-char 128))
  310. !                       last-input-char
  311. !                     last-command-char)))
  312.       (exit-minibuffer))
  313.   )
  314.   
  315. *** calc-aent.el    Sun Oct 27 14:57:48 1991
  316. --- ../dist/calc-aent.el    Thu Nov 21 23:24:12 1991
  317. ***************
  318. *** 305,311 ****
  319.         (define-key calc-alg-ent-map "`" 'calcAlg-edit)
  320.         (define-key calc-alg-ent-map "\C-m" 'calcAlg-enter)
  321.         (define-key calc-alg-ent-map "\C-j" 'calcAlg-enter)
  322. !       (setq calc-alg-ent-esc-map (copy-keymap esc-map))
  323.         (let ((i 33))
  324.       (while (< i 127)
  325.         (aset calc-alg-ent-esc-map i 'calcAlg-escape)
  326. --- 305,311 ----
  327.         (define-key calc-alg-ent-map "`" 'calcAlg-edit)
  328.         (define-key calc-alg-ent-map "\C-m" 'calcAlg-enter)
  329.         (define-key calc-alg-ent-map "\C-j" 'calcAlg-enter)
  330. !       (setq calc-alg-ent-esc-map (copy-sequence esc-map))
  331.         (let ((i 33))
  332.       (while (< i 127)
  333.         (aset calc-alg-ent-esc-map i 'calcAlg-escape)
  334. ***************
  335. *** 314,320 ****
  336.       (if (eq calc-algebraic-mode 'total)
  337.       (define-key calc-alg-ent-map "\e" calc-alg-ent-esc-map)
  338.         (define-key calc-alg-ent-map "\ep" 'calcAlg-plus-minus)
  339. !       (define-key calc-alg-ent-map "\em" 'calcAlg-mod))
  340.       (setq calc-aborted-prefix nil)
  341.       (let ((buf (read-from-minibuffer (or prompt "Algebraic: ")
  342.                        (or initial "")
  343. --- 314,321 ----
  344.       (if (eq calc-algebraic-mode 'total)
  345.       (define-key calc-alg-ent-map "\e" calc-alg-ent-esc-map)
  346.         (define-key calc-alg-ent-map "\ep" 'calcAlg-plus-minus)
  347. !       (define-key calc-alg-ent-map "\em" 'calcAlg-mod)
  348. !       (define-key calc-alg-ent-map "\e%" 'self-insert-command))
  349.       (setq calc-aborted-prefix nil)
  350.       (let ((buf (read-from-minibuffer (or prompt "Algebraic: ")
  351.                        (or initial "")
  352. ***************
  353. *** 819,833 ****
  354.                  (throw 'syntax "Expected ']'")))
  355.              val)))))
  356.         ((eq exp-token 'dollar)
  357. !        (if (>= (length calc-dollar-values) (math-abs exp-data))
  358. !            (let ((num exp-data))
  359. !          (math-read-token)
  360. !          (setq calc-dollar-used (max calc-dollar-used num))
  361. !          (math-check-complete (nth (1- (math-abs num))
  362. !                        calc-dollar-values)))
  363. !          (throw 'syntax (if calc-dollar-values
  364. !                 "Too many $'s"
  365. !                   "$'s not allowed in this context"))))
  366.         ((eq exp-token 'hash)
  367.          (or calc-hashes-used
  368.              (throw 'syntax "#'s not allowed in this context"))
  369. --- 820,834 ----
  370.                  (throw 'syntax "Expected ']'")))
  371.              val)))))
  372.         ((eq exp-token 'dollar)
  373. !        (let ((abs (if (> exp-data 0) exp-data (- exp-data))))
  374. !          (if (>= (length calc-dollar-values) abs)
  375. !          (let ((num exp-data))
  376. !            (math-read-token)
  377. !            (setq calc-dollar-used (max calc-dollar-used num))
  378. !            (math-check-complete (nth (1- abs) calc-dollar-values)))
  379. !            (throw 'syntax (if calc-dollar-values
  380. !                   "Too many $'s"
  381. !                 "$'s not allowed in this context")))))
  382.         ((eq exp-token 'hash)
  383.          (or calc-hashes-used
  384.              (throw 'syntax "#'s not allowed in this context"))
  385. No differences encountered
  386. No differences encountered
  387. No differences encountered
  388. *** calc-arith.el    Sun Oct 27 14:57:50 1991
  389. --- ../dist/calc-arith.el    Thu Nov 21 23:24:47 1991
  390. ***************
  391. *** 2636,2643 ****
  392.   
  393.   (defun calcFunc-percent (x)
  394.     (if (math-objectp x)
  395. !       (math-mul x '(float 1 -2))
  396.       (list 'calcFunc-percent x))
  397.   )
  398.   
  399.   
  400. --- 2636,2650 ----
  401.   
  402.   (defun calcFunc-percent (x)
  403.     (if (math-objectp x)
  404. !       (let ((calc-prefer-frac nil))
  405. !     (math-div x 100))
  406.       (list 'calcFunc-percent x))
  407. + )
  408. + (defun calcFunc-relch (x y)
  409. +   (if (and (math-objectp x) (math-objectp y))
  410. +       (math-div (math-sub y x) x)
  411. +     (list 'calcFunc-relch x y))
  412.   )
  413.   
  414.   
  415. No differences encountered
  416. No differences encountered
  417. *** calc-comp.el    Sun Oct 27 14:58:02 1991
  418. --- ../dist/calc-comp.el    Thu Nov 21 23:25:24 1991
  419. ***************
  420. *** 61,70 ****
  421.        ((math-scalarp a)
  422.         (if (or (eq (car-safe a) 'frac)
  423.             (and (nth 1 calc-frac-format) (Math-integerp a)))
  424. !       (if (memq calc-language '(tex eqn math))
  425.             (let ((aa (math-adjust-fraction a))
  426.               (calc-frac-format nil))
  427. !         (math-compose-expr (list '/ (nth 1 aa) (nth 2 aa)) prec))
  428.           (if (and (eq calc-language 'big)
  429.                (= (length (car calc-frac-format)) 1))
  430.           (let* ((aa (math-adjust-fraction a))
  431. --- 61,74 ----
  432.        ((math-scalarp a)
  433.         (if (or (eq (car-safe a) 'frac)
  434.             (and (nth 1 calc-frac-format) (Math-integerp a)))
  435. !       (if (memq calc-language '(tex eqn math maple c fortran pascal))
  436.             (let ((aa (math-adjust-fraction a))
  437.               (calc-frac-format nil))
  438. !         (math-compose-expr (list '/
  439. !                      (if (memq calc-language '(c fortran))
  440. !                          (math-float (nth 1 aa))
  441. !                        (nth 1 aa))
  442. !                      (nth 2 aa)) prec))
  443.           (if (and (eq calc-language 'big)
  444.                (= (length (car calc-frac-format)) 1))
  445.           (let* ((aa (math-adjust-fraction a))
  446. ***************
  447. *** 344,350 ****
  448.            (a2 (math-compose-expr (nth 2 a) 0)))
  449.       (if (or (eq (car-safe a1) 'subscr)
  450.           (and (eq (car-safe a1) 'tag)
  451. !              (eq (car-safe (nth 2 a1)) 'subscr)))
  452.           (list 'subscr
  453.             (nth 1 a1)
  454.             (list 'horiz
  455. --- 348,355 ----
  456.            (a2 (math-compose-expr (nth 2 a) 0)))
  457.       (if (or (eq (car-safe a1) 'subscr)
  458.           (and (eq (car-safe a1) 'tag)
  459. !              (eq (car-safe (nth 2 a1)) 'subscr)
  460. !              (setq a1 (nth 2 a1))))
  461.           (list 'subscr
  462.             (nth 1 a1)
  463.             (list 'horiz
  464. ***************
  465. *** 381,387 ****
  466.                (eq (nth 2 (nth 1 a)) 0)))
  467.           (list 'horiz "(" (math-compose-expr (nth 1 a) 0) ")")
  468.             (math-compose-expr (nth 1 a) 201))
  469. !         (let ((calc-language 'flat))
  470.             (math-compose-expr (nth 2 a) 0))))
  471.        ((and (eq (car a) '/)
  472.          (eq calc-language 'big))
  473. --- 386,393 ----
  474.                (eq (nth 2 (nth 1 a)) 0)))
  475.           (list 'horiz "(" (math-compose-expr (nth 1 a) 0) ")")
  476.             (math-compose-expr (nth 1 a) 201))
  477. !         (let ((calc-language 'flat)
  478. !           (calc-number-radix 10))
  479.             (math-compose-expr (nth 2 a) 0))))
  480.        ((and (eq (car a) '/)
  481.          (eq calc-language 'big))
  482. ***************
  483. *** 701,707 ****
  484.                        (equal (car op) "**")
  485.                        (and (equal (car op) "*")
  486.                         (math-comp-last-char lhs)
  487. !                       (math-comp-first-char rhs)))
  488.                    (car op)
  489.                      (if (and (eq calc-language 'big)
  490.                       (equal (car op) "=>"))
  491. --- 707,716 ----
  492.                        (equal (car op) "**")
  493.                        (and (equal (car op) "*")
  494.                         (math-comp-last-char lhs)
  495. !                       (math-comp-first-char rhs))
  496. !                      (and (equal (car op) "/")
  497. !                       (math-num-integerp (nth 1 a))
  498. !                       (math-integerp (nth 2 a))))
  499.                    (car op)
  500.                      (if (and (eq calc-language 'big)
  501.                       (equal (car op) "=>"))
  502. No differences encountered
  503. No differences encountered
  504. *** calc-ext.el    Sun Oct 27 14:57:30 1991
  505. --- ../dist/calc-ext.el    Thu Nov 21 23:24:42 1991
  506. ***************
  507. *** 1,4 ****
  508. ! ;; Calculator for GNU Emacs version 2.00, part II
  509.   ;; Copyright (C) 1990, 1991 Free Software Foundation, Inc.
  510.   ;; Written by Dave Gillespie, daveg@csvax.cs.caltech.edu.
  511.   
  512. --- 1,4 ----
  513. ! ;; Calculator for GNU Emacs version 2.01, part II
  514.   ;; Copyright (C) 1990, 1991 Free Software Foundation, Inc.
  515.   ;; Written by Dave Gillespie, daveg@csvax.cs.caltech.edu.
  516.   
  517. ***************
  518. *** 94,99 ****
  519. --- 94,100 ----
  520.     (define-key calc-mode-map "\C-_" 'calc-undo)
  521.     (define-key calc-mode-map "\C-xu" 'calc-undo)
  522.     (define-key calc-mode-map "\M-\C-m" 'calc-last-args)
  523. +   (define-key calc-mode-map "\M-%" 'calc-percent)
  524.   
  525.     (define-key calc-mode-map "a" nil)
  526.     (define-key calc-mode-map "a?" 'calc-a-prefix-help)
  527. ***************
  528. *** 171,176 ****
  529. --- 172,178 ----
  530.     (define-key calc-mode-map "bT" 'calc-fin-rate)
  531.     (define-key calc-mode-map "bY" 'calc-fin-syd)
  532.     (define-key calc-mode-map "b#" 'calc-fin-nper)
  533. +   (define-key calc-mode-map "b%" 'calc-percent-change)
  534.   
  535.     (define-key calc-mode-map "c" nil)
  536.     (define-key calc-mode-map "c?" 'calc-c-prefix-help)
  537. ***************
  538. *** 182,187 ****
  539. --- 184,190 ----
  540.     (define-key calc-mode-map "cr" 'calc-to-radians)
  541.     (define-key calc-mode-map "cC" 'calc-cos)
  542.     (define-key calc-mode-map "cF" 'calc-fraction)
  543. +   (define-key calc-mode-map "c%" 'calc-convert-percent)
  544.   
  545.     (define-key calc-mode-map "d" nil)
  546.     (define-key calc-mode-map "d?" 'calc-d-prefix-help)
  547. ***************
  548. *** 620,627 ****
  549.                       (cdr (aref calc-mode-map i))))))
  550.         (setq i (1+ i))))
  551.   
  552. !   (setq calc-alg-map (copy-keymap calc-mode-map)
  553. !     calc-alg-esc-map (copy-keymap esc-map))
  554.     (let ((i 32))
  555.       (while (< i 127)
  556.         (or (memq i '(?' ?` ?= ??))
  557. --- 623,630 ----
  558.                       (cdr (aref calc-mode-map i))))))
  559.         (setq i (1+ i))))
  560.   
  561. !   (setq calc-alg-map (copy-sequence calc-mode-map)
  562. !     calc-alg-esc-map (copy-sequence esc-map))
  563.     (let ((i 32))
  564.       (while (< i 127)
  565.         (or (memq i '(?' ?` ?= ??))
  566. ***************
  567. *** 690,697 ****
  568.   calcFunc-fround calcFunc-frounde calcFunc-froundu calcFunc-ftrunc
  569.   calcFunc-idiv calcFunc-incr calcFunc-mant calcFunc-max calcFunc-min
  570.   calcFunc-mod calcFunc-mul calcFunc-neg calcFunc-percent calcFunc-pow
  571. ! calcFunc-round calcFunc-rounde calcFunc-roundu calcFunc-scf
  572. ! calcFunc-sub calcFunc-xpon math-abs math-abs-approx
  573.   math-add-objects-fancy math-add-or-sub math-add-symb-fancy
  574.   math-ceiling math-combine-prod math-combine-sum math-div-by-zero
  575.   math-div-objects-fancy math-div-symb-fancy math-div-zero
  576. --- 693,700 ----
  577.   calcFunc-fround calcFunc-frounde calcFunc-froundu calcFunc-ftrunc
  578.   calcFunc-idiv calcFunc-incr calcFunc-mant calcFunc-max calcFunc-min
  579.   calcFunc-mod calcFunc-mul calcFunc-neg calcFunc-percent calcFunc-pow
  580. ! calcFunc-relch calcFunc-round calcFunc-rounde calcFunc-roundu
  581. ! calcFunc-scf calcFunc-sub calcFunc-xpon math-abs math-abs-approx
  582.   math-add-objects-fancy math-add-or-sub math-add-symb-fancy
  583.   math-ceiling math-combine-prod math-combine-sum math-div-by-zero
  584.   math-div-objects-fancy math-div-symb-fancy math-div-zero
  585. ***************
  586. *** 739,749 ****
  587.   calc-do-embedded-activate calc-embedded-evaluate-expr
  588.   calc-embedded-modes-change calc-embedded-var-change)
  589.   
  590. !  ("calc-fin" calc-Need-calc-fin calcFunc-ddb calcFunc-fv calcFunc-fvb
  591. ! calcFunc-fvl calcFunc-irr calcFunc-irrb calcFunc-nper calcFunc-nperb
  592. ! calcFunc-nperl calcFunc-npv calcFunc-npvb calcFunc-pmt calcFunc-pmtb
  593. ! calcFunc-pv calcFunc-pvb calcFunc-pvl calcFunc-rate calcFunc-rateb
  594. ! calcFunc-ratel calcFunc-sln calcFunc-syd)
  595.   
  596.    ("calc-forms" calc-Need-calc-forms calcFunc-date calcFunc-day
  597.   calcFunc-dsadj calcFunc-hms calcFunc-hour calcFunc-incmonth
  598. --- 742,752 ----
  599.   calc-do-embedded-activate calc-embedded-evaluate-expr
  600.   calc-embedded-modes-change calc-embedded-var-change)
  601.   
  602. !  ("calc-fin" calc-Need-calc-fin calc-to-percentage calcFunc-ddb
  603. ! calcFunc-fv calcFunc-fvb calcFunc-fvl calcFunc-irr calcFunc-irrb
  604. ! calcFunc-nper calcFunc-nperb calcFunc-nperl calcFunc-npv calcFunc-npvb
  605. ! calcFunc-pmt calcFunc-pmtb calcFunc-pv calcFunc-pvb calcFunc-pvl
  606. ! calcFunc-rate calcFunc-rateb calcFunc-ratel calcFunc-sln calcFunc-syd)
  607.   
  608.    ("calc-forms" calc-Need-calc-forms calcFunc-date calcFunc-day
  609.   calcFunc-dsadj calcFunc-hms calcFunc-hour calcFunc-incmonth
  610. ***************
  611. *** 951,959 ****
  612.   calc-embedded-select calc-embedded-update-formula calc-embedded-word
  613.   calc-find-globals calc-show-plain)
  614.   
  615. !  ("calc-fin" calc-fin-ddb calc-fin-fv calc-fin-irr calc-fin-nper
  616. ! calc-fin-npv calc-fin-pmt calc-fin-pv calc-fin-rate calc-fin-sln
  617. ! calc-fin-syd)
  618.   
  619.    ("calc-forms" calc-convert-time-zones calc-date calc-date-notation
  620.   calc-date-part calc-from-hms calc-hms-mode calc-hms-notation
  621. --- 954,963 ----
  622.   calc-embedded-select calc-embedded-update-formula calc-embedded-word
  623.   calc-find-globals calc-show-plain)
  624.   
  625. !  ("calc-fin" calc-convert-percent calc-fin-ddb calc-fin-fv
  626. ! calc-fin-irr calc-fin-nper calc-fin-npv calc-fin-pmt calc-fin-pv
  627. ! calc-fin-rate calc-fin-sln calc-fin-syd calc-percent
  628. ! calc-percent-change)
  629.   
  630.    ("calc-forms" calc-convert-time-zones calc-date calc-date-notation
  631.   calc-date-part calc-from-hms calc-hms-mode calc-hms-notation
  632. ***************
  633. *** 1234,1243 ****
  634.         (setq calc-prefix-help-phase 0)
  635.         (if key
  636.         (if msgs
  637. !           (message (concat group ": " (car msgs) ":  "
  638. !                    (char-to-string key) "-"))
  639. !         (message (concat group ": (none)  " (char-to-string key) "-")))
  640. !     (message (concat group ": " (car msgs)))))
  641.       (and key
  642.        (setq unread-command-char key)))
  643.   )
  644. --- 1238,1246 ----
  645.         (setq calc-prefix-help-phase 0)
  646.         (if key
  647.         (if msgs
  648. !           (message "%s: %s: %c-" group (car msgs) key)
  649. !         (message "%s: (none)  %c-" group (car msgs) key))
  650. !     (message "%s: %s" group (car msgs))))
  651.       (and key
  652.        (setq unread-command-char key)))
  653.   )
  654. *** calc-fin.el    Sun Oct 27 14:57:57 1991
  655. --- ../dist/calc-fin.el    Thu Nov 21 23:25:08 1991
  656. ***************
  657. *** 84,97 ****
  658.   (defun calc-fin-rate ()
  659.     (interactive)
  660.     (calc-slow-wrapper
  661. !    (if (calc-is-hyperbolic)
  662. !        (calc-enter-result 3 "ratl" (cons 'calcFunc-ratel
  663. !                      (calc-top-list-n 3)))
  664. !      (if (calc-is-inverse)
  665. !      (calc-enter-result 3 "ratb" (cons 'calcFunc-rateb
  666. !                        (calc-top-list-n 3)))
  667. !        (calc-enter-result 3 "rate" (cons 'calcFunc-rate
  668. !                      (calc-top-list-n 3))))))
  669.   )
  670.   
  671.   (defun calc-fin-irr (arg)
  672. --- 84,98 ----
  673.   (defun calc-fin-rate ()
  674.     (interactive)
  675.     (calc-slow-wrapper
  676. !    (calc-pop-push-record 3
  677. !              (if (calc-is-hyperbolic) "ratl"
  678. !                (if (calc-is-inverse) "ratb" "rate"))
  679. !              (calc-to-percentage
  680. !               (calc-normalize
  681. !                (cons (if (calc-is-hyperbolic) 'calcFunc-ratel
  682. !                    (if (calc-is-hyperbolic) 'calcFunc-rateb
  683. !                      'calcFunc-rate))
  684. !                  (calc-top-list-n 3))))))
  685.   )
  686.   
  687.   (defun calc-fin-irr (arg)
  688. ***************
  689. *** 120,125 ****
  690. --- 121,156 ----
  691.      (calc-enter-result 4 "ddb" (cons 'calcFunc-ddb (calc-top-list-n 4))))
  692.   )
  693.   
  694. + (defun calc-to-percentage (x)
  695. +   (cond ((Math-objectp x)
  696. +      (setq x (math-mul x 100))
  697. +      (if (Math-num-integerp x)
  698. +          (setq x (math-trunc x)))
  699. +      (list 'calcFunc-percent x))
  700. +     ((Math-vectorp x)
  701. +      (cons 'vec (mapcar 'calc-to-percentage (cdr x))))
  702. +     (t x))
  703. + )
  704. + (defun calc-convert-percent ()
  705. +   (interactive)
  706. +   (calc-slow-wrapper
  707. +    (calc-pop-push-record 1 "c%" (calc-to-percentage (calc-top-n 1))))
  708. + )
  709. + (defun calc-percent ()
  710. +   (interactive)
  711. +   (calc-slow-wrapper
  712. +    (calc-pop-push-record 1 "%" (list 'calcFunc-percent (calc-top-n 1))))
  713. + )
  714. + (defun calc-percent-change ()
  715. +   (interactive)
  716. +   (calc-slow-wrapper
  717. +    (let ((res (calc-normalize (cons 'calcFunc-relch (calc-top-list 2)))))
  718. +      (calc-pop-push-record 2 "%ch" (calc-to-percentage res))))
  719. + )
  720.   
  721.   
  722.   
  723. No differences encountered
  724. No differences encountered
  725. No differences encountered
  726. No differences encountered
  727. *** calc-help.el    Sun Oct 27 14:57:49 1991
  728. --- ../dist/calc-help.el    Thu Nov 21 23:24:43 1991
  729. ***************
  730. *** 297,303 ****
  731.       (if inv (setq desc (concat "I " desc)))
  732.       (if hyp (setq desc (concat "H " desc)))
  733.       (calc-describe-thing desc "Key Index" nil
  734. !                  (> (length desc) (length key))))))
  735.   )
  736.   
  737.   (defun calc-describe-function (&optional func)
  738. --- 297,303 ----
  739.       (if inv (setq desc (concat "I " desc)))
  740.       (if hyp (setq desc (concat "H " desc)))
  741.       (calc-describe-thing desc "Key Index" nil
  742. !                  (string-match "[A-Z][A-Z][A-Z]" desc)))))
  743.   )
  744.   
  745.   (defun calc-describe-function (&optional func)
  746. ***************
  747. *** 572,578 ****
  748.      '("And, Or, Xor, Diff, Not; Wordsize, Clip"
  749.        "Lshift, Rshift, roTate; SHIFT + signed Lshift, Rshift"
  750.        "SHIFT + business: Pv, Npv, Fv, pMt, #pmts, raTe, Irr"
  751. !      "SHIFT + business: Sln, sYd, Ddb")
  752.      "binary/bus" ?b)
  753.   )
  754.   
  755. --- 572,578 ----
  756.      '("And, Or, Xor, Diff, Not; Wordsize, Clip"
  757.        "Lshift, Rshift, roTate; SHIFT + signed Lshift, Rshift"
  758.        "SHIFT + business: Pv, Npv, Fv, pMt, #pmts, raTe, Irr"
  759. !      "SHIFT + business: Sln, sYd, Ddb; %ch")
  760.      "binary/bus" ?b)
  761.   )
  762.   
  763. ***************
  764. *** 580,586 ****
  765.   (defun calc-c-prefix-help ()
  766.     (interactive)
  767.     (calc-do-prefix-help
  768. !    '("Deg, Rad, HMS; Float; Polar/rect; Clean, 0-9"
  769.        "SHIFT + Fraction")
  770.      "convert" ?c)
  771.   )
  772. --- 580,586 ----
  773.   (defun calc-c-prefix-help ()
  774.     (interactive)
  775.     (calc-do-prefix-help
  776. !    '("Deg, Rad, HMS; Float; Polar/rect; Clean, 0-9; %"
  777.        "SHIFT + Fraction")
  778.      "convert" ?c)
  779.   )
  780. No differences encountered
  781. *** calc-keypd.el    Sun Oct 27 14:58:02 1991
  782. --- ../dist/calc-keypd.el    Thu Nov 21 23:25:25 1991
  783. ***************
  784. *** 65,71 ****
  785.         (put 'calc-keypad 'mode-class 'special)
  786.         (make-local-variable 'calc-main-buffer)
  787.         (setq calc-main-buffer calcbuf)
  788. !       (calc-keypad-redraw)))
  789.       (let ((width 29)
  790.         (height 17)
  791.         win old-win)
  792. --- 65,72 ----
  793.         (put 'calc-keypad 'mode-class 'special)
  794.         (make-local-variable 'calc-main-buffer)
  795.         (setq calc-main-buffer calcbuf)
  796. !       (calc-keypad-redraw)
  797. !       (calc-trail-buffer)))
  798.       (let ((width 29)
  799.         (height 17)
  800.         win old-win)
  801. No differences encountered
  802. No differences encountered
  803. *** calc-maint.el    Sun Oct 27 14:57:47 1991
  804. --- ../dist/calc-maint.el    Thu Nov 21 23:24:03 1991
  805. ***************
  806. *** 319,325 ****
  807.   )
  808.   
  809.   (defun calc-private-autoloads ()
  810. !   "Modify the public \"default\" file to contain the necessary autoload and
  811.   global-set-key commands for Calc."
  812.     (interactive)
  813.     (let ((home default-directory))
  814. --- 319,325 ----
  815.   )
  816.   
  817.   (defun calc-private-autoloads ()
  818. !   "Modify the user's \".emacs\" file to contain the necessary autoload and
  819.   global-set-key commands for Calc."
  820.     (interactive)
  821.     (let ((home default-directory))
  822. ***************
  823. *** 361,367 ****
  824.   \(setq load-path (append load-path (list \"" (directory-file-name home) "\")))
  825.   \(global-set-key \"\\e#\" 'calc-dispatch)
  826.   ;;; End of Calc autoloads.\n")
  827. !   (save-buffer)
  828.   )
  829.   
  830.   
  831. --- 361,368 ----
  832.   \(setq load-path (append load-path (list \"" (directory-file-name home) "\")))
  833.   \(global-set-key \"\\e#\" 'calc-dispatch)
  834.   ;;; End of Calc autoloads.\n")
  835. !   (let ((trim-versions-without-asking t))
  836. !     (save-buffer))
  837.   )
  838.   
  839.   
  840. *** calc-map.el    Sun Oct 27 14:58:00 1991
  841. --- ../dist/calc-map.el    Thu Nov 21 23:25:20 1991
  842. ***************
  843. *** 583,589 ****
  844.                   ( ?S 3 calcFunc-sln )
  845.                   ( ?T 3 calcFunc-rate )
  846.                   ( ?Y 4 calcFunc-syd )
  847. !                 ( ?\# 3 calcFunc-nper ) )
  848.                     ( ( ?F 3 calcFunc-fvb )
  849.                   ( ?I 1 calcFunc-irrb )
  850.                   ( ?M 3 calcFunc-pmtb )
  851. --- 583,590 ----
  852.                   ( ?S 3 calcFunc-sln )
  853.                   ( ?T 3 calcFunc-rate )
  854.                   ( ?Y 4 calcFunc-syd )
  855. !                 ( ?\# 3 calcFunc-nper )
  856. !                 ( ?\% 2 calcFunc-relch ) )
  857.                     ( ( ?F 3 calcFunc-fvb )
  858.                   ( ?I 1 calcFunc-irrb )
  859.                   ( ?M 3 calcFunc-pmtb )
  860. No differences encountered
  861. No differences encountered
  862. *** calc-misc.el    Sun Oct 27 14:57:48 1991
  863. --- ../dist/calc-misc.el    Thu Nov 21 23:24:11 1991
  864. ***************
  865. *** 282,288 ****
  866.          "Prefix keys: Trail/time, Units/statistics, Vector/matrix"
  867.          "Prefix keys: Z (user), SHIFT + Z (define)"
  868.          "Prefix keys: prefix + ? gives further help for that prefix"
  869. !        "  Calc 2.00 by Dave Gillespie, daveg@csvax.cs.caltech.edu")))
  870.       (if calc-full-help-flag
  871.       msgs
  872.         (if (or calc-inverse-flag calc-hyperbolic-flag)
  873. --- 282,288 ----
  874.          "Prefix keys: Trail/time, Units/statistics, Vector/matrix"
  875.          "Prefix keys: Z (user), SHIFT + Z (define)"
  876.          "Prefix keys: prefix + ? gives further help for that prefix"
  877. !        "  Calc 2.01 by Dave Gillespie, daveg@csvax.cs.caltech.edu")))
  878.       (if calc-full-help-flag
  879.       msgs
  880.         (if (or calc-inverse-flag calc-hyperbolic-flag)
  881. No differences encountered
  882. *** calc-poly.el    Sun Oct 27 14:58:01 1991
  883. --- ../dist/calc-poly.el    Thu Nov 21 23:25:22 1991
  884. ***************
  885. *** 847,854 ****
  886.   (defun calcFunc-nrat (expr)
  887.     (if (math-any-floats expr)
  888.         (setq expr (calcFunc-pfrac expr)))
  889. !   (if (math-vectorp expr)
  890. !       (cons 'vec (mapcar 'calcFunc-nrat (cdr expr)))
  891.       (let* ((calc-prefer-frac t)
  892.          (res (math-to-ratpoly expr))
  893.          (num (math-simplify (math-sort-terms (calcFunc-expand (car res)))))
  894. --- 847,855 ----
  895.   (defun calcFunc-nrat (expr)
  896.     (if (math-any-floats expr)
  897.         (setq expr (calcFunc-pfrac expr)))
  898. !   (if (or (math-vectorp expr)
  899. !       (assq (car-safe expr) calc-tweak-eqn-table))
  900. !       (cons (car expr) (mapcar 'calcFunc-nrat (cdr expr)))
  901.       (let* ((calc-prefer-frac t)
  902.          (res (math-to-ratpoly expr))
  903.          (num (math-simplify (math-sort-terms (calcFunc-expand (car res)))))
  904. No differences encountered
  905. No differences encountered
  906. No differences encountered
  907. No differences encountered
  908. *** calc-sel.el    Sun Oct 27 14:57:53 1991
  909. --- ../dist/calc-sel.el    Thu Nov 21 23:24:55 1991
  910. ***************
  911. *** 67,73 ****
  912.   
  913.   (defun calc-select-once-maybe (num)
  914.     (interactive "P")
  915. !   (calc-select-once num t t)
  916.   )
  917.   
  918.   (defun calc-select-additional ()
  919. --- 67,73 ----
  920.   
  921.   (defun calc-select-once-maybe (num)
  922.     (interactive "P")
  923. !   (calc-select-here num t t)
  924.   )
  925.   
  926.   (defun calc-select-additional ()
  927. No differences encountered
  928. No differences encountered
  929. No differences encountered
  930. No differences encountered
  931. No differences encountered
  932. *** calc-units.el    Sun Oct 27 14:58:00 1991
  933. --- ../dist/calc-units.el    Thu Nov 21 23:25:18 1991
  934. ***************
  935. *** 731,737 ****
  936.              u1
  937.              u2)))
  938.       ((eq (car expr) '/)
  939. !      (if (math-units-in-expr-p (nth 2 expr))
  940.            'wrong
  941.          (math-single-units-in-expr-p (nth 1 expr))))
  942.       (t 'wrong))
  943. --- 731,737 ----
  944.              u1
  945.              u2)))
  946.       ((eq (car expr) '/)
  947. !      (if (math-units-in-expr-p (nth 2 expr) nil)
  948.            'wrong
  949.          (math-single-units-in-expr-p (nth 1 expr))))
  950.       (t 'wrong))
  951. No differences encountered
  952. No differences encountered
  953. No differences encountered
  954. *** calc.texinfo    Sun Oct 27 14:57:47 1991
  955. --- ../dist/calc.texinfo    Thu Nov 21 23:24:03 1991
  956. ***************
  957. *** 3,9 ****
  958.   @c smallbook
  959.   @setfilename calc.info
  960.   @c [title]
  961. ! @settitle GNU Emacs Calc 2.00 Manual
  962.   @setchapternewpage odd
  963.   @comment %**end of header (This is for running Texinfo on a region.)
  964.   
  965. --- 3,9 ----
  966.   @c smallbook
  967.   @setfilename calc.info
  968.   @c [title]
  969. ! @settitle GNU Emacs Calc 2.01 Manual
  970.   @setchapternewpage odd
  971.   @comment %**end of header (This is for running Texinfo on a region.)
  972.   
  973. ***************
  974. *** 98,107 ****
  975.   @sp 6
  976.   @center @titlefont{Calc Manual}
  977.   @sp 4
  978. ! @center GNU Emacs Calc Version 2.00
  979.   @c [volume]
  980.   @sp 1
  981. ! @center October 1991
  982.   @sp 5
  983.   @center Dave Gillespie
  984.   @center daveg@@synaptics.com
  985. --- 98,107 ----
  986.   @sp 6
  987.   @center @titlefont{Calc Manual}
  988.   @sp 4
  989. ! @center GNU Emacs Calc Version 2.01
  990.   @c [volume]
  991.   @sp 1
  992. ! @center November 1991
  993.   @sp 5
  994.   @center Dave Gillespie
  995.   @center daveg@@synaptics.com
  996. ***************
  997. *** 140,146 ****
  998.   @ichapter The GNU Emacs Calculator
  999.   
  1000.   @noindent
  1001. ! @dfn{Calc 2.00} is an advanced desk calculator and mathematical tool
  1002.   that runs as part of the GNU Emacs environment.
  1003.   
  1004.   This manual is divided into three major parts: "Getting Started," the
  1005. --- 140,146 ----
  1006.   @ichapter The GNU Emacs Calculator
  1007.   
  1008.   @noindent
  1009. ! @dfn{Calc 2.01} is an advanced desk calculator and mathematical tool
  1010.   that runs as part of the GNU Emacs environment.
  1011.   
  1012.   This manual is divided into three major parts: "Getting Started," the
  1013. ***************
  1014. *** 490,497 ****
  1015.   read is the ``Getting Started'' chapter of this manual and possibly the
  1016.   first few sections of the tutorial.  As you become more comfortable with
  1017.   the program you can learn its additional features.  In terms of efficiency,
  1018. ! scope and depth, Calc cannot replace a powerful tool like Mathematica@c{\trademark}
  1019. ! @asis{ (tm)}.
  1020.   But Calc has the advantages of convenience, portability, and availability
  1021.   of the source code.  And, of course, it's free!
  1022.   
  1023. --- 490,498 ----
  1024.   read is the ``Getting Started'' chapter of this manual and possibly the
  1025.   first few sections of the tutorial.  As you become more comfortable with
  1026.   the program you can learn its additional features.  In terms of efficiency,
  1027. ! scope and depth, Calc cannot replace a powerful tool like Mathematica.
  1028. ! @c Removed this per RMS' request:
  1029. ! @c Mathematica@c{\trademark} @asis{ (tm)}.
  1030.   But Calc has the advantages of convenience, portability, and availability
  1031.   of the source code.  And, of course, it's free!
  1032.   
  1033. ***************
  1034. *** 667,673 ****
  1035.   
  1036.   ...
  1037.   --**-Emacs: myfile             (Fundamental)----All----------------------
  1038. ! --- Emacs Calculator Mode ---                   |Emacs Calc Mode v2.00...
  1039.   2:  17.3                                        |    17.3
  1040.   1:  -5                                          |    3
  1041.       .                                           |    2
  1042. --- 668,674 ----
  1043.   
  1044.   ...
  1045.   --**-Emacs: myfile             (Fundamental)----All----------------------
  1046. ! --- Emacs Calculator Mode ---                   |Emacs Calc Mode v2.01...
  1047.   2:  17.3                                        |    17.3
  1048.   1:  -5                                          |    3
  1049.       .                                           |    2
  1050. ***************
  1051. *** 789,795 ****
  1052.                                           |1:  -5
  1053.                                           |    .
  1054.                                           |--%%-Calc: 12 Deg       (Calcul
  1055. !                                         |----+-----Calc 2.00-----+----1
  1056.                                           |FLR |CEIL|RND |TRNC|CLN2|FLT |
  1057.                                           |----+----+----+----+----+----|
  1058.                                           | LN |EXP |    |ABS |IDIV|MOD |
  1059. --- 790,796 ----
  1060.                                           |1:  -5
  1061.                                           |    .
  1062.                                           |--%%-Calc: 12 Deg       (Calcul
  1063. !                                         |----+-----Calc 2.01-----+----1
  1064.                                           |FLR |CEIL|RND |TRNC|CLN2|FLT |
  1065.                                           |----+----+----+----+----+----|
  1066.                                           | LN |EXP |    |ABS |IDIV|MOD |
  1067. ***************
  1068. *** 5244,5250 ****
  1069.   
  1070.   @group
  1071.   @smallexample
  1072. ! 2:  34*x - 24*pow(x, 3)               2:  34*x - 24*x ** 3
  1073.   1:  @{sqrt(51) / 6, sqrt(51) / -6, 0@}  1:  /sqrt(51) / 6, sqrt(51) / -6, 0/
  1074.       .                                     .
  1075.   
  1076. --- 5245,5251 ----
  1077.   
  1078.   @group
  1079.   @smallexample
  1080. ! 2:  34*x - 24*pow(x, 3)               2:  34*x - 24*x**3
  1081.   1:  @{sqrt(51) / 6, sqrt(51) / -6, 0@}  1:  /sqrt(51) / 6, sqrt(51) / -6, 0/
  1082.       .                                     .
  1083.   
  1084. ***************
  1085. *** 5273,5279 ****
  1086.   Notice that @samp{sqrt(51)} may cause problems with older
  1087.   implementations of C and FORTRAN, which would require something more
  1088.   like @samp{sqrt(51.0)}.  It is always wise to check over the formulas
  1089. ! produced by the various language modes to make sure they fully correct.
  1090.   
  1091.   Type @kbd{m s}, @kbd{m f}, and @kbd{d N} to reset these modes.  (You
  1092.   may prefer to remain in Big mode, but all the examples in the tutorial
  1093. --- 5274,5281 ----
  1094.   Notice that @samp{sqrt(51)} may cause problems with older
  1095.   implementations of C and FORTRAN, which would require something more
  1096.   like @samp{sqrt(51.0)}.  It is always wise to check over the formulas
  1097. ! produced by the various language modes to make sure they are fully
  1098. ! correct.
  1099.   
  1100.   Type @kbd{m s}, @kbd{m f}, and @kbd{d N} to reset these modes.  (You
  1101.   may prefer to remain in Big mode, but all the examples in the tutorial
  1102. ***************
  1103. *** 5433,5439 ****
  1104.   @noindent
  1105.   where @cite{n} (which must be even) is the number of slices and @cite{h}
  1106.   is the width of each slice.  These are 10 and 0.1 in our example.
  1107. ! For reference, here is the corresponding equation for the stairstep
  1108.   method:
  1109.   
  1110.   @ifinfo
  1111. --- 5435,5441 ----
  1112.   @noindent
  1113.   where @cite{n} (which must be even) is the number of slices and @cite{h}
  1114.   is the width of each slice.  These are 10 and 0.1 in our example.
  1115. ! For reference, here is the corresponding formula for the stairstep
  1116.   method:
  1117.   
  1118.   @ifinfo
  1119. ***************
  1120. *** 5491,5498 ****
  1121.   @noindent
  1122.   If we were simplifying this by hand, we'd probably replace the
  1123.   @samp{tan} with a @samp{sin/cos} first, then combine over a common
  1124. ! denominator.  There is no Calc command to do the former; the @kbd{j M}
  1125. ! selection command will do the latter but we'll do both with rewrite
  1126.   rules just for practice.
  1127.   
  1128.   Rewrite rules are written with the @samp{:=} symbol.
  1129. --- 5493,5500 ----
  1130.   @noindent
  1131.   If we were simplifying this by hand, we'd probably replace the
  1132.   @samp{tan} with a @samp{sin/cos} first, then combine over a common
  1133. ! denominator.  There is no Calc command to do the former; the @kbd{a n}
  1134. ! algebra command will do the latter but we'll do both with rewrite
  1135.   rules just for practice.
  1136.   
  1137.   Rewrite rules are written with the @samp{:=} symbol.
  1138. ***************
  1139. *** 11361,11367 ****
  1140.   interval @samp{[3 .. inf)} represents all real numbers greater than
  1141.   or equal to 3, and @samp{(-inf .. inf)} represents all real numbers.
  1142.   In fact, @samp{[-inf .. inf]} represents all real numbers including
  1143. ! infinity.
  1144.   
  1145.   Intervals are entered in the notation shown here, either as algebraic
  1146.   formulas, or using incomplete forms.  (@xref{Incomplete Objects}.)
  1147. --- 11363,11369 ----
  1148.   interval @samp{[3 .. inf)} represents all real numbers greater than
  1149.   or equal to 3, and @samp{(-inf .. inf)} represents all real numbers.
  1150.   In fact, @samp{[-inf .. inf]} represents all real numbers including
  1151. ! the real infinities.
  1152.   
  1153.   Intervals are entered in the notation shown here, either as algebraic
  1154.   formulas, or using incomplete forms.  (@xref{Incomplete Objects}.)
  1155. ***************
  1156. *** 11405,11410 ****
  1157. --- 11407,11423 ----
  1158.   be 0 for @samp{(..)}, 1 for @samp{(..]}, 2 for @samp{[..)}, or
  1159.   3 for @samp{[..]}.
  1160.   
  1161. + Please note that in fully rigorous interval arithmetic, care would be
  1162. + taken to make sure that computation of the lower bound rounds toward
  1163. + minus infinity, while upper bound computations round toward plus
  1164. + infinity.  Calc's arithmetic always uses a round-to-nearest mode,
  1165. + which means that roundoff errors could creep into an interval
  1166. + calculation to produce intervals slightly smaller than they ought to
  1167. + be.  For example, entering @samp{[1..2]} and pressing @kbd{Q 2 ^}
  1168. + should yield the interval @samp{[1..2]}, but in fact it yields the
  1169. + (slightly too small) interval @samp{[1..1.9999999]} due to roundoff
  1170. + error.
  1171.   @node Incomplete Objects, Variables, Interval Forms, Data Types
  1172.   @section Incomplete Objects
  1173.   
  1174. ***************
  1175. *** 11742,11751 ****
  1176.   
  1177.   @kindex M-DEL
  1178.   @pindex calc-pop-above
  1179. ! The @kbd{M-DEL} (@code{calc-pop-above}) command is to @kbd{DEL} what
  1180. ! @kbd{LFD} is to @kbd{RET}, i.e., it interprets the sign of the numeric
  1181.   prefix argument in the opposite way, and the default argument is 2.
  1182. ! Thus @kbd{M-DEL} by itself removes the second-from-top stack element,
  1183.   leaving the first, third, fourth, and so on; @kbd{M-3 M-DEL} deletes
  1184.   the third stack element.
  1185.   
  1186. --- 11755,11764 ----
  1187.   
  1188.   @kindex M-DEL
  1189.   @pindex calc-pop-above
  1190. ! The @key{M-DEL} (@code{calc-pop-above}) command is to @key{DEL} what
  1191. ! @key{LFD} is to @key{RET}, i.e., it interprets the sign of the numeric
  1192.   prefix argument in the opposite way, and the default argument is 2.
  1193. ! Thus @key{M-DEL} by itself removes the second-from-top stack element,
  1194.   leaving the first, third, fourth, and so on; @kbd{M-3 M-DEL} deletes
  1195.   the third stack element.
  1196.   
  1197. ***************
  1198. *** 14245,14251 ****
  1199.   @samp{string([65, 66, 67])} and can still be manipulated this way; for
  1200.   example, the selection and vector commands @kbd{j 1 v v j u} would
  1201.   select the vector portion of this object and reverse the elements, then
  1202. ! deselect to reveal a string whose characters have been reversed.
  1203.   
  1204.   The composition functions do the same thing in all language modes
  1205.   (although their components will of course be formatted in the current
  1206. --- 14258,14264 ----
  1207.   @samp{string([65, 66, 67])} and can still be manipulated this way; for
  1208.   example, the selection and vector commands @kbd{j 1 v v j u} would
  1209.   select the vector portion of this object and reverse the elements, then
  1210. ! deselect to reveal a string whose characters had been reversed.
  1211.   
  1212.   The composition functions do the same thing in all language modes
  1213.   (although their components will of course be formatted in the current
  1214. ***************
  1215. *** 16167,16193 ****
  1216.   key followed by a shifted letter.  (The @kbd{b} prefix followed by
  1217.   a lower-case letter is used for operations on binary numbers.)
  1218.   
  1219. ! @tindex %
  1220. ! @tindex percent
  1221. ! Since many of these functions have @var{rate} arguments which would
  1222. ! normally be written as percentages, Calc accepts the notation
  1223. ! @samp{@var{x}%} during algebraic entry.  This is equivalent to
  1224. ! @samp{@var{x} * .01}.  In other words, the @var{rate} argument
  1225. ! to these functions wants something like @samp{8%} or @samp{.08}
  1226. ! as a value, @emph{not} 8 (which would correspond to a rate of
  1227. ! 800%!).
  1228.   
  1229. ! Also note that the rate and the number of intervals must be on the
  1230. ! same time scale, e.g., months or years.  Mixing an annual interest
  1231. ! rate with a time expressed in months will give you very wrong
  1232. ! answers!
  1233. ! Finally, it is wise to compute these functions to a higher precision
  1234. ! than you really need, just to make sure your answer is correct to
  1235. ! the last penny; also, you may wish to check the definitions at the end
  1236.   of this section to make sure the functions have the meaning you expect.
  1237.   
  1238.   @menu
  1239.   * Future Value::
  1240.   * Present Value::
  1241.   * Related Financial Functions::
  1242. --- 16180,16197 ----
  1243.   key followed by a shifted letter.  (The @kbd{b} prefix followed by
  1244.   a lower-case letter is used for operations on binary numbers.)
  1245.   
  1246. ! Note that the rate and the number of intervals given to these
  1247. ! functions must be on the same time scale, e.g., both months or
  1248. ! both years.  Mixing an annual interest rate with a time expressed
  1249. ! in months will give you very wrong answers!
  1250.   
  1251. ! It is wise to compute these functions to a higher precision than
  1252. ! you really need, just to make sure your answer is correct to the
  1253. ! last penny; also, you may wish to check the definitions at the end
  1254.   of this section to make sure the functions have the meaning you expect.
  1255.   
  1256.   @menu
  1257. + * Percentages::
  1258.   * Future Value::
  1259.   * Present Value::
  1260.   * Related Financial Functions::
  1261. ***************
  1262. *** 16195,16201 ****
  1263.   * Definitions of Financial Functions::
  1264.   @end menu
  1265.   
  1266. ! @node Future Value, Present Value, Financial Functions, Financial Functions
  1267.   @subsection Future Value
  1268.   
  1269.   @noindent
  1270. --- 16199,16270 ----
  1271.   * Definitions of Financial Functions::
  1272.   @end menu
  1273.   
  1274. ! @node Percentages, Future Value, Financial Functions, Financial Functions
  1275. ! @subsection Percentages
  1276. ! @kindex M-%
  1277. ! @pindex calc-percent
  1278. ! @tindex %
  1279. ! @tindex percent
  1280. ! The @kbd{M-%} (@code{calc-percent}) command takes a percentage value,
  1281. ! say 5.4, and converts it to an equivalent actual number.  For example,
  1282. ! @kbd{5.4 M-%} enters 0.054 on the stack.  (That's the @key{META} or
  1283. ! @key{ESC} key combined with @kbd{%}.)
  1284. ! Actually, @kbd{M-%} creates a formula of the form @samp{5.4%}.
  1285. ! You can enter @samp{5.4%} yourself during algebraic entry.  The
  1286. ! @samp{%} operator simply means, ``the preceding value divided by
  1287. ! 100.''  The @samp{%} operator has very high precedence, so that
  1288. ! @samp{1+8%} is interpreted as @samp{1+(8%)}, not as @samp{(1+8)%}.
  1289. ! (The @samp{%} operator is just a postfix notation for the
  1290. ! @code{percent} function, just like @samp{20!} is the notation for
  1291. ! @samp{fact(20)}, or twenty-factorial).
  1292. ! The formula @samp{5.4%} would normally evaluate immediately to
  1293. ! 0.054, but the @kbd{M-%} command suppresses evaluation as it puts
  1294. ! the formula onto the stack.  However, the next Calc command that
  1295. ! uses the formula @samp{5.4%} will evaluate it as its first step.
  1296. ! The net effect is that you get to look at @samp{5.4%} on the stack,
  1297. ! but Calc commands see it as @samp{0.054}, which is what they expect.
  1298. ! In particular, @samp{5.4%} and @samp{0.054} are suitable values
  1299. ! for the @var{rate} arguments of the various financial functions,
  1300. ! but the number @samp{5.4} is probably @emph{not} suitable---it
  1301. ! represents a rate of 540 percent!
  1302. ! The key sequence @kbd{M-% *} effectively means ``percent-of.''
  1303. ! For example, @kbd{68 RET 25 M-% *} computes 17, which is 25% of
  1304. ! 68 (and also 68% of 25, which comes out to the same thing).
  1305. ! @kindex c %
  1306. ! @pindex calc-convert-percent
  1307. ! The @kbd{c %} (@code{calc-convert-percent}) command converts the
  1308. ! value on the top of the stack from numeric to percentage form.
  1309. ! For example, if 0.08 is on the stack, @kbd{c %} converts it to
  1310. ! @samp{8%}.  The quantity is the same, it's just represented
  1311. ! differently.  (Contrast this with @kbd{M-%}, which would convert
  1312. ! this number to @samp{0.08%}.)  The @kbd{=} key is a convenient way
  1313. ! to convert a formula like @samp{8%} back to numeric form, 0.08.
  1314. ! To compute what percentage one quantity is of another quantity,
  1315. ! use @kbd{/ c %}.  For example, @kbd{17 RET 68 / c %} displays
  1316. ! @samp{25%}.
  1317. ! @kindex b %
  1318. ! @pindex calc-percent-change
  1319. ! @tindex relch
  1320. ! The @kbd{b %} (@code{calc-percent-change}) [@code{relch}] command
  1321. ! calculates the percentage change from one number to another.
  1322. ! For example, @kbd{40 RET 50 b %} produces the answer @samp{25%},
  1323. ! since 50 is 25% larger than 40.  A negative result represents a
  1324. ! decrease:  @kbd{50 RET 40 b %} produces @samp{-20%}, since 40 is
  1325. ! 20% smaller than 50.  (The answers are different in magnitude
  1326. ! because, in the first case, we're increasing by 25% of 40, but
  1327. ! in the second case, we're decreasing by 20% of 50.)  The effect
  1328. ! of @kbd{40 RET 50 b %} is to compute @cite{(50-40)/40}, converting
  1329. ! the answer to percentage form as if by @kbd{c %}.
  1330. ! @node Future Value, Present Value, Percentages, Financial Functions
  1331.   @subsection Future Value
  1332.   
  1333.   @noindent
  1334. ***************
  1335. *** 16222,16228 ****
  1336.   in the account after five years?  @code{fvb(5.4%, 5, 1000) = 5870.73}.
  1337.   Thus you will have earned $870 worth of interest over the years.
  1338.   Using the stack, this calculation would have been
  1339. ! @kbd{.054 RET 5 RET 1000 I b F}.  Note that the rate is expressed
  1340.   as a number between 0 and 1, @emph{not} as a percentage.
  1341.   
  1342.   @kindex H b F
  1343. --- 16291,16297 ----
  1344.   in the account after five years?  @code{fvb(5.4%, 5, 1000) = 5870.73}.
  1345.   Thus you will have earned $870 worth of interest over the years.
  1346.   Using the stack, this calculation would have been
  1347. ! @kbd{5.4 M-% 5 RET 1000 I b F}.  Note that the rate is expressed
  1348.   as a number between 0 and 1, @emph{not} as a percentage.
  1349.   
  1350.   @kindex H b F
  1351. ***************
  1352. *** 16401,16407 ****
  1353.   the rate of return on an investment.  This is also an inverse of @code{pv}:
  1354.   @code{rate(@var{n}, @var{payment}, @var{amount})} computes the value of
  1355.   @var{rate} such that @code{pv(@var{rate}, @var{n}, @var{payment}) =
  1356. ! @var{amount}}.@refill
  1357.   
  1358.   @kindex I b T
  1359.   @tindex H b T
  1360. --- 16470,16476 ----
  1361.   the rate of return on an investment.  This is also an inverse of @code{pv}:
  1362.   @code{rate(@var{n}, @var{payment}, @var{amount})} computes the value of
  1363.   @var{rate} such that @code{pv(@var{rate}, @var{n}, @var{payment}) =
  1364. ! @var{amount}}.  The result is expressed as a formula like @samp{6.3%}.@refill
  1365.   
  1366.   @kindex I b T
  1367.   @tindex H b T
  1368. ***************
  1369. *** 16412,16418 ****
  1370.   in place of @code{pv}.  Also, @code{rate} and @code{rateb} can
  1371.   accept an optional fourth argument just like @code{pv} and @code{pvb}.
  1372.   To redo the above example from a different perspective,
  1373. ! @code{ratel(9, 2000, 1000) = .08}, which says you will need an
  1374.   interest rate of 8% in order to double your account in nine years.@refill
  1375.   
  1376.   @kindex b I
  1377. --- 16481,16487 ----
  1378.   in place of @code{pv}.  Also, @code{rate} and @code{rateb} can
  1379.   accept an optional fourth argument just like @code{pv} and @code{pvb}.
  1380.   To redo the above example from a different perspective,
  1381. ! @code{ratel(9, 2000, 1000) = 8.00597%}, which says you will need an
  1382.   interest rate of 8% in order to double your account in nine years.@refill
  1383.   
  1384.   @kindex b I
  1385. ***************
  1386. *** 27406,27412 ****
  1387.   
  1388.   @group
  1389.   @smallexample
  1390. ! |----+-----Calc 2.00-----+----1
  1391.   |FLR |CEIL|RND |TRNC|CLN2|FLT |
  1392.   |----+----+----+----+----+----|
  1393.   | LN |EXP |    |ABS |IDIV|MOD |
  1394. --- 27475,27481 ----
  1395.   
  1396.   @group
  1397.   @smallexample
  1398. ! |----+-----Calc 2.01-----+----1
  1399.   |FLR |CEIL|RND |TRNC|CLN2|FLT |
  1400.   |----+----+----+----+----+----|
  1401.   | LN |EXP |    |ABS |IDIV|MOD |
  1402. ***************
  1403. *** 32336,32342 ****
  1404.   @appendix Installation
  1405.   
  1406.   @noindent
  1407. ! Calc 2.00 comes as a set of GNU Emacs Lisp files, with names like
  1408.   @file{calc.el} and @file{calc-ext.el}, and also as a @file{calc.texinfo}
  1409.   file which can be used to generate both on-line and printed
  1410.   documentation.@refill
  1411. --- 32405,32411 ----
  1412.   @appendix Installation
  1413.   
  1414.   @noindent
  1415. ! Calc 2.01 comes as a set of GNU Emacs Lisp files, with names like
  1416.   @file{calc.el} and @file{calc-ext.el}, and also as a @file{calc.texinfo}
  1417.   file which can be used to generate both on-line and printed
  1418.   documentation.@refill
  1419. ***************
  1420. *** 32506,32515 ****
  1421.   Unless you have installed the Calc files in Emacs' main @file{lisp/}
  1422.   directory, you will also have to add a command that looks like the
  1423.   following to tell Emacs where to find them.  In this example, we
  1424. ! have put the files in directory @file{/usr/gnu/src/calc-2.00}.
  1425.   
  1426.   @smallexample
  1427. ! (setq load-path (append load-path (list "/usr/gnu/src/calc-2.00")))
  1428.   @end smallexample
  1429.   
  1430.   @noindent
  1431. --- 32575,32584 ----
  1432.   Unless you have installed the Calc files in Emacs' main @file{lisp/}
  1433.   directory, you will also have to add a command that looks like the
  1434.   following to tell Emacs where to find them.  In this example, we
  1435. ! have put the files in directory @file{/usr/gnu/src/calc-2.01}.
  1436.   
  1437.   @smallexample
  1438. ! (setq load-path (append load-path (list "/usr/gnu/src/calc-2.01")))
  1439.   @end smallexample
  1440.   
  1441.   @noindent
  1442. ***************
  1443. *** 32561,32574 ****
  1444.   @code{load-path}:
  1445.   
  1446.   @example
  1447. ! (autoload 'calc-dispatch "calc-2.00/calc" "Calculator" t)
  1448.   @end example
  1449.   
  1450.   @noindent
  1451.   Suppose the directory @file{/usr/gnu/src/emacs/lisp} is on the path, and
  1452.   the above @code{autoload} allows Emacs to find Calc under the name
  1453. ! @file{/usr/gnu/src/emacs/lisp/calc-2.00/calc.elc}.  Then when Calc
  1454. ! starts up it will add @file{/usr/gnu/src/emacs/lisp/calc-2.00}
  1455.   to the path so that it will later be able to find its component files.
  1456.   
  1457.   @vindex calc-autoload-directory
  1458. --- 32630,32643 ----
  1459.   @code{load-path}:
  1460.   
  1461.   @example
  1462. ! (autoload 'calc-dispatch "calc-2.01/calc" "Calculator" t)
  1463.   @end example
  1464.   
  1465.   @noindent
  1466.   Suppose the directory @file{/usr/gnu/src/emacs/lisp} is on the path, and
  1467.   the above @code{autoload} allows Emacs to find Calc under the name
  1468. ! @file{/usr/gnu/src/emacs/lisp/calc-2.01/calc.elc}.  Then when Calc
  1469. ! starts up it will add @file{/usr/gnu/src/emacs/lisp/calc-2.01}
  1470.   to the path so that it will later be able to find its component files.
  1471.   
  1472.   @vindex calc-autoload-directory
  1473. ***************
  1474. *** 32728,32734 ****
  1475.   copy if you really need it.  To print the manual, you will need the
  1476.   @TeX{} typesetting program (this is a free program by Donald Knuth
  1477.   at Stanford University) as well as the @file{texindex} program and
  1478. ! @file{texinfo.tex} file that come with GNU Emacs.@refill
  1479.   
  1480.   To print the Calc manual in one huge 550 page tome, type @samp{make tex}.
  1481.   This will take care of running the manual through @TeX{} twice so that
  1482. --- 32797,32804 ----
  1483.   copy if you really need it.  To print the manual, you will need the
  1484.   @TeX{} typesetting program (this is a free program by Donald Knuth
  1485.   at Stanford University) as well as the @file{texindex} program and
  1486. ! @file{texinfo.tex} file, both of which can be obtained from the FSF
  1487. ! under the name @code{texinfo2}.@refill
  1488.   
  1489.   To print the Calc manual in one huge 550 page tome, type @samp{make tex}.
  1490.   This will take care of running the manual through @TeX{} twice so that
  1491. ***************
  1492. *** 32870,32876 ****
  1493.   @appendix Calc Summary
  1494.   
  1495.   @noindent
  1496. ! This section includes a complete list of Calc 2.00 keystroke commands.
  1497.   Each line lists the stack entries used by the command (top-of-stack
  1498.   last), the keystrokes themselves, the prompts asked by the command,
  1499.   and the result of the command (also with top-of-stack last).
  1500. --- 32940,32946 ----
  1501.   @appendix Calc Summary
  1502.   
  1503.   @noindent
  1504. ! This section includes a complete list of Calc 2.01 keystroke commands.
  1505.   Each line lists the stack entries used by the command (top-of-stack
  1506.   last), the keystrokes themselves, the prompts asked by the command,
  1507.   and the result of the command (also with top-of-stack last).
  1508. ***************
  1509. *** 32884,32889 ****
  1510. --- 32954,32960 ----
  1511.   @xref{Command Index}.  @xref{Function Index}.
  1512.   
  1513.   @iftex
  1514. + @begingroup
  1515.   @tex
  1516.   \gdef\sumrow#1{\sumrowx#1\relax}%
  1517.   \gdef\sumrowx#1\:#2\:#3\:#4\:#5\:#6\relax{%
  1518. ***************
  1519. *** 32978,32983 ****
  1520. --- 33049,33055 ----
  1521.   @r{      a@:      &     @:             @:     1  @:inv@:(a)  1/a}
  1522.   @r{      a@:      !     @:             @:     1  @:fact@:(a)  a!}
  1523.   @r{      a@:      =     @:             @:     1  @:evalv@:(a)}
  1524. + @r{      a@:      M-%   @:             @:        @:percent@:(a)}
  1525.    
  1526.   @c 
  1527.   @r{  ... a@:      RET   @:             @:     1  @:@:... a a}
  1528. ***************
  1529. *** 33186,33191 ****
  1530. --- 33258,33264 ----
  1531.   @r{  r p a@:      b #   @:             @:        @:nper@:(r,p,a)}
  1532.   @r{  r p a@:    I b #   @:             @:        @:nperb@:(r,p,a)}
  1533.   @r{  r p a@:    H b #   @:             @:        @:nperl@:(r,p,a)}
  1534. + @r{    a b@:      b %   @:             @:        @:relch@:(a,b)}
  1535.    
  1536.   @c 
  1537.   @r{      a@:      c c   @:             @:     5  @:pclean@:(a,p)}
  1538. ***************
  1539. *** 33205,33210 ****
  1540. --- 33278,33286 ----
  1541.   @r{      a@:    H c F   @:             @:     5  @:frac@:(a,p)}
  1542.    
  1543.   @c 
  1544. + @r{      a@:      c %   @:             @:        @:percent@:(a*100)}
  1545. +  
  1546. + @c 
  1547.   @r{       @:      d .   @:char         @:    50  @:calc-point-char@:}
  1548.   @r{       @:      d ,   @:char         @:    50  @:calc-group-char@:}
  1549.   @r{       @:      d <   @:             @: 13,50  @:calc-left-justify@:}
  1550. ***************
  1551. *** 34068,34073 ****
  1552. --- 34144,34150 ----
  1553.   @iftex
  1554.   (Space is provided below for you to keep your own written notes.)
  1555.   @page
  1556. + @endgroup
  1557.   @end iftex
  1558.   
  1559.   
  1560.  
  1561. exit 0 # Just in case...
  1562. -- 
  1563. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1564. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1565. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1566. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1567.