home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-11-25 | 56.9 KB | 1,597 lines |
- Newsgroups: comp.sources.misc
- From: daveg@synaptics.com (David Gillespie)
- Subject: v26i068: gnucalc - GNU Emacs Calculator, Patch01
- Message-ID: <1991Nov26.032130.29517@sparky.imd.sterling.com>
- X-Md4-Signature: 02c138808c750dc841b38a3b691ec542
- Date: Tue, 26 Nov 1991 03:21:30 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: daveg@synaptics.com (David Gillespie)
- Posting-number: Volume 26, Issue 68
- Archive-name: gnucalc/patch01
- Environment: Emacs
- Patch-To: gnucalc: Volume 24, Issue 49-104
-
- The following patches convert Calc version 2.00 into Calc
- version 2.01. To apply them automatically with Patch v2.0,
- first cd into your Calc distribution directory, then execute
- "patch < calc.patch", where "calc.patch" is the name of this file.
-
- A list of changes appears at the end of the README file. Several
- bugs that prevented Calc from being installed or loaded on certain
- systems have been fixed. A few other bugs have been fixed, and one
- new feature (some commands for manipulating percentages) has been
- introduced.
-
- Patches and complete tar files are also available for anonymous FTP
- from csvax.cs.caltech.edu [131.215.131.131], in the "pub" subdirectory.
-
- Enjoy!
- -- Dave
-
- Dave Gillespie
- daveg@synaptics.com (or daveg@csvax.cs.caltech.edu)
-
-
- *** README Sun Oct 27 14:57:27 1991
- --- ../dist/README Thu Nov 21 23:23:16 1991
- ***************
- *** 1,5 ****
-
- ! This directory contains version 2.00 of Calc, an advanced desk
- calculator for GNU Emacs.
-
- "Calc" Copyright 1990, 1991 Free Software Foundation, Inc.
- --- 1,5 ----
-
- ! This directory contains version 2.01 of Calc, an advanced desk
- calculator for GNU Emacs.
-
- "Calc" Copyright 1990, 1991 Free Software Foundation, Inc.
- ***************
- *** 53,65 ****
-
- To install Calc:
-
- ! 1. Type "uncompress calc-2.00.tar.Z"
-
- ! 2. Type "tar xvf calc-2.00.tar"
-
- ! 1,2. Alternatively: "zcat calc-2.00.tar.Z | tar xvf -"
-
- ! 3. Note that the Calc tar file now creates a "calc-2.00" subdirectory
- of the current directory in which to place its files.
-
- 4. Follow the instructions in the file "INSTALL".
- --- 53,65 ----
-
- To install Calc:
-
- ! 1. Type "uncompress calc-2.01.tar.Z"
-
- ! 2. Type "tar xvf calc-2.01.tar"
-
- ! 1,2. Alternatively: "zcat calc-2.01.tar.Z | tar xvf -"
-
- ! 3. Note that the Calc tar file now creates a "calc-2.01" subdirectory
- of the current directory in which to place its files.
-
- 4. Follow the instructions in the file "INSTALL".
- ***************
- *** 69,75 ****
- Calc is written entirely in Emacs Lisp, for maximum portability.
- You do not need to recompile Emacs to install and use Calc.
-
- ! You will need about eight megabytes of disk space to install Calc
- and its Info documentation.
-
- See the file INSTALL for installation instructions. The instructions
- --- 69,75 ----
- Calc is written entirely in Emacs Lisp, for maximum portability.
- You do not need to recompile Emacs to install and use Calc.
-
- ! You will need about six megabytes of disk space to install Calc
- and its Info documentation.
-
- See the file INSTALL for installation instructions. The instructions
- ***************
- *** 90,96 ****
-
- The latest Calc tar files and patches are always available for anonymous
- FTP on csvax.cs.caltech.edu [131.215.131.131]. Look in the "pub"
- ! subdirectory. Calc may also be available soon on prep.ai.mit.edu.
-
- Thanks,
-
- --- 90,97 ----
-
- The latest Calc tar files and patches are always available for anonymous
- FTP on csvax.cs.caltech.edu [131.215.131.131]. Look in the "pub"
- ! subdirectory. Calc is also available on prep.ai.mit.edu, and in the
- ! archives of the comp.sources.misc Usenet group.
-
- Thanks,
-
- ***************
- *** 104,109 ****
- --- 105,137 ----
- ------- -- ------- -- ----
-
-
- + Version 2.01:
- +
- + * Added percentage commands `M-%', `b %', and `c %'.
- +
- + * Changed Big mode to force radix-10 in superscripts.
- +
- + * Improved display of fractions in various language modes.
- +
- + * Changed `a n' to work properly with equations and inequalities.
- +
- + * The problem with cross references to Index nodes in TeX has been fixed.
- +
- + * Fixed a bug where recursive esc-maps make calc-ext/-aent unloadable.
- +
- + * Fixed a bug in `M-# k', then `OFF' right away, with fresh Emacs.
- +
- + * Fixed a bug in which "S_i_j" was formatted wrong after `j s'.
- +
- + * Fixed a bug in which `h k u c' positioned cursor on wrong line.
- +
- + * Fixed a bug where `z ?' crashed if `z %' was defined.
- +
- + * Fixed a bug in `j O' (calc-select-once-maybe).
- +
- + * Fixed "make private" not to ask "Delete excess versions" and crash.
- +
- +
- Version 2.00:
-
- * First complete posting of Calc since 1.01.
- *** INSTALL Sun Oct 27 14:57:28 1991
- --- ../dist/INSTALL Thu Nov 21 23:23:17 1991
- ***************
- *** 2,8 ****
- Installation
- ************
-
- ! Calc 2.00 comes as a set of GNU Emacs Lisp files, with names like
- `calc.el' and `calc-ext.el', and also as a `calc.texinfo' file which
- can be used to generate both on-line and printed documentation.
-
- --- 2,8 ----
- Installation
- ************
-
- ! Calc 2.01 comes as a set of GNU Emacs Lisp files, with names like
- `calc.el' and `calc-ext.el', and also as a `calc.texinfo' file which
- can be used to generate both on-line and printed documentation.
-
- ***************
- *** 142,150 ****
- Unless you have installed the Calc files in Emacs' main `lisp/'
- directory, you will also have to add a command that looks like the
- following to tell Emacs where to find them. In this example, we have
- ! put the files in directory `/usr/gnu/src/calc-2.00'.
-
- ! (setq load-path (append load-path (list "/usr/gnu/src/calc-2.00")))
-
- The `make public' and `make private' commands also do this (they use
- the then-current directory as the name to add to the path). If you
- --- 142,150 ----
- Unless you have installed the Calc files in Emacs' main `lisp/'
- directory, you will also have to add a command that looks like the
- following to tell Emacs where to find them. In this example, we have
- ! put the files in directory `/usr/gnu/src/calc-2.01'.
-
- ! (setq load-path (append load-path (list "/usr/gnu/src/calc-2.01")))
-
- The `make public' and `make private' commands also do this (they use
- the then-current directory as the name to add to the path). If you
- ***************
- *** 187,198 ****
- `autoload' command for `calc-dispatch'. If that name included
- directory information, Calc adds that directory to the `load-path':
-
- ! (autoload 'calc-dispatch "calc-2.00/calc" "Calculator" t)
-
- Suppose the directory `/usr/gnu/src/emacs/lisp' is on the path, and
- the above `autoload' allows Emacs to find Calc under the name
- ! `/usr/gnu/src/emacs/lisp/calc-2.00/calc.elc'. Then when Calc starts
- ! up it will add `/usr/gnu/src/emacs/lisp/calc-2.00' to the path so that
- it will later be able to find its component files.
-
- If the above strategy does not locate the component files, Calc
- --- 187,198 ----
- `autoload' command for `calc-dispatch'. If that name included
- directory information, Calc adds that directory to the `load-path':
-
- ! (autoload 'calc-dispatch "calc-2.01/calc" "Calculator" t)
-
- Suppose the directory `/usr/gnu/src/emacs/lisp' is on the path, and
- the above `autoload' allows Emacs to find Calc under the name
- ! `/usr/gnu/src/emacs/lisp/calc-2.01/calc.elc'. Then when Calc starts
- ! up it will add `/usr/gnu/src/emacs/lisp/calc-2.01' to the path so that
- it will later be able to find its component files.
-
- If the above strategy does not locate the component files, Calc
- ***************
- *** 313,319 ****
- copy if you really need it. To print the manual, you will need the
- TeX typesetting program (this is a free program by Donald Knuth at
- Stanford University) as well as the `texindex' program and
- ! `texinfo.tex' file that come with GNU Emacs.
-
- To print the Calc manual in one huge 550 page tome, type `make tex'.
- This will take care of running the manual through TeX twice so that
- --- 313,320 ----
- copy if you really need it. To print the manual, you will need the
- TeX typesetting program (this is a free program by Donald Knuth at
- Stanford University) as well as the `texindex' program and
- ! `texinfo.tex' file, both of which can be obtained from the FSF under
- ! the name `texinfo2'.
-
- To print the Calc manual in one huge 550 page tome, type `make tex'.
- This will take care of running the manual through TeX twice so that
- *** Makefile Sun Oct 27 14:57:28 1991
- --- ../dist/Makefile Thu Nov 21 23:23:17 1991
- ***************
- *** 1,7 ****
- ! # Makefile for "Calc 2.00", the GNU Emacs Calculator.
- # Copyright (C) 1991 Free Software Foundation.
- # Author: Dave Gillespie.
- ! # Author's address: daveg@csvax.caltech.edu; 256-80 Caltech/Pasadena CA 91125.
-
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- --- 1,7 ----
- ! # Makefile for "Calc 2.01", the GNU Emacs Calculator.
- # Copyright (C) 1991 Free Software Foundation.
- # Author: Dave Gillespie.
- ! # Author's address: daveg@synaptics.com; 256-80 Caltech/Pasadena CA 91125.
-
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- *** calc.el Sun Oct 27 14:57:29 1991
- --- ../dist/calc.el Thu Nov 21 23:24:10 1991
- ***************
- *** 1,4 ****
- ! ;; Calculator for GNU Emacs version 2.00, part I
- ;; Copyright (C) 1990, 1991 Free Software Foundation, Inc.
- ;; Written by Dave Gillespie, daveg@csvax.cs.caltech.edu.
-
- --- 1,4 ----
- ! ;; Calculator for GNU Emacs version 2.01, part I
- ;; Copyright (C) 1990, 1991 Free Software Foundation, Inc.
- ;; Written by Dave Gillespie, daveg@csvax.cs.caltech.edu.
-
- ***************
- *** 674,681 ****
- (put 'math-underflow 'error-conditions '(error math-underflow calc-error))
- (put 'math-underflow 'error-message "Floating-point underflow occurred")
-
- ! (setq calc-version "2.00"
- ! calc-version-date "Sat Oct 26 17:36:38 PDT 1991"
- calc-trail-pointer nil ; "Current" entry in trail buffer.
- calc-trail-overlay nil ; Value of overlay-arrow-string.
- calc-was-split nil ; Had multiple windows before Calc.
- --- 674,681 ----
- (put 'math-underflow 'error-conditions '(error math-underflow calc-error))
- (put 'math-underflow 'error-message "Floating-point underflow occurred")
-
- ! (setq calc-version "2.01"
- ! calc-version-date "Thu Nov 21 23:23:17 PST 1991"
- calc-trail-pointer nil ; "Current" entry in trail buffer.
- calc-trail-overlay nil ; Value of overlay-arrow-string.
- calc-was-split nil ; Had multiple windows before Calc.
- ***************
- *** 1991,1997 ****
- (calc-prev-char nil)
- (calc-prev-prev-char nil)
- (calc-buffer (current-buffer))
- ! (buf (read-from-minibuffer "Calc: " "" calc-digit-map)))
- (or calc-digit-value (setq calc-digit-value (math-read-number buf)))
- (if (stringp calc-digit-value)
- (calc-alg-entry calc-digit-value)
- --- 1991,2002 ----
- (calc-prev-char nil)
- (calc-prev-prev-char nil)
- (calc-buffer (current-buffer))
- ! (old-esc (aref global-map 27))
- ! (buf (unwind-protect
- ! (progn
- ! (aset global-map 27 nil)
- ! (read-from-minibuffer "Calc: " "" calc-digit-map))
- ! (aset global-map 27 old-esc))))
- (or calc-digit-value (setq calc-digit-value (math-read-number buf)))
- (if (stringp calc-digit-value)
- (calc-alg-entry calc-digit-value)
- ***************
- *** 2019,2025 ****
- (calc-temp-minibuffer-message " [Bad format]"))
- (or (memq last-command-char '(32 13))
- (setq prefix-arg current-prefix-arg
- ! unread-command-char last-command-char))
- (exit-minibuffer))
- )
-
- --- 2024,2033 ----
- (calc-temp-minibuffer-message " [Bad format]"))
- (or (memq last-command-char '(32 13))
- (setq prefix-arg current-prefix-arg
- ! unread-command-char (if (and (eq last-command-char 27)
- ! (>= last-input-char 128))
- ! last-input-char
- ! last-command-char)))
- (exit-minibuffer))
- )
-
- *** calc-aent.el Sun Oct 27 14:57:48 1991
- --- ../dist/calc-aent.el Thu Nov 21 23:24:12 1991
- ***************
- *** 305,311 ****
- (define-key calc-alg-ent-map "`" 'calcAlg-edit)
- (define-key calc-alg-ent-map "\C-m" 'calcAlg-enter)
- (define-key calc-alg-ent-map "\C-j" 'calcAlg-enter)
- ! (setq calc-alg-ent-esc-map (copy-keymap esc-map))
- (let ((i 33))
- (while (< i 127)
- (aset calc-alg-ent-esc-map i 'calcAlg-escape)
- --- 305,311 ----
- (define-key calc-alg-ent-map "`" 'calcAlg-edit)
- (define-key calc-alg-ent-map "\C-m" 'calcAlg-enter)
- (define-key calc-alg-ent-map "\C-j" 'calcAlg-enter)
- ! (setq calc-alg-ent-esc-map (copy-sequence esc-map))
- (let ((i 33))
- (while (< i 127)
- (aset calc-alg-ent-esc-map i 'calcAlg-escape)
- ***************
- *** 314,320 ****
- (if (eq calc-algebraic-mode 'total)
- (define-key calc-alg-ent-map "\e" calc-alg-ent-esc-map)
- (define-key calc-alg-ent-map "\ep" 'calcAlg-plus-minus)
- ! (define-key calc-alg-ent-map "\em" 'calcAlg-mod))
- (setq calc-aborted-prefix nil)
- (let ((buf (read-from-minibuffer (or prompt "Algebraic: ")
- (or initial "")
- --- 314,321 ----
- (if (eq calc-algebraic-mode 'total)
- (define-key calc-alg-ent-map "\e" calc-alg-ent-esc-map)
- (define-key calc-alg-ent-map "\ep" 'calcAlg-plus-minus)
- ! (define-key calc-alg-ent-map "\em" 'calcAlg-mod)
- ! (define-key calc-alg-ent-map "\e%" 'self-insert-command))
- (setq calc-aborted-prefix nil)
- (let ((buf (read-from-minibuffer (or prompt "Algebraic: ")
- (or initial "")
- ***************
- *** 819,833 ****
- (throw 'syntax "Expected ']'")))
- val)))))
- ((eq exp-token 'dollar)
- ! (if (>= (length calc-dollar-values) (math-abs exp-data))
- ! (let ((num exp-data))
- ! (math-read-token)
- ! (setq calc-dollar-used (max calc-dollar-used num))
- ! (math-check-complete (nth (1- (math-abs num))
- ! calc-dollar-values)))
- ! (throw 'syntax (if calc-dollar-values
- ! "Too many $'s"
- ! "$'s not allowed in this context"))))
- ((eq exp-token 'hash)
- (or calc-hashes-used
- (throw 'syntax "#'s not allowed in this context"))
- --- 820,834 ----
- (throw 'syntax "Expected ']'")))
- val)))))
- ((eq exp-token 'dollar)
- ! (let ((abs (if (> exp-data 0) exp-data (- exp-data))))
- ! (if (>= (length calc-dollar-values) abs)
- ! (let ((num exp-data))
- ! (math-read-token)
- ! (setq calc-dollar-used (max calc-dollar-used num))
- ! (math-check-complete (nth (1- abs) calc-dollar-values)))
- ! (throw 'syntax (if calc-dollar-values
- ! "Too many $'s"
- ! "$'s not allowed in this context")))))
- ((eq exp-token 'hash)
- (or calc-hashes-used
- (throw 'syntax "#'s not allowed in this context"))
- No differences encountered
- No differences encountered
- No differences encountered
- *** calc-arith.el Sun Oct 27 14:57:50 1991
- --- ../dist/calc-arith.el Thu Nov 21 23:24:47 1991
- ***************
- *** 2636,2643 ****
-
- (defun calcFunc-percent (x)
- (if (math-objectp x)
- ! (math-mul x '(float 1 -2))
- (list 'calcFunc-percent x))
- )
-
-
- --- 2636,2650 ----
-
- (defun calcFunc-percent (x)
- (if (math-objectp x)
- ! (let ((calc-prefer-frac nil))
- ! (math-div x 100))
- (list 'calcFunc-percent x))
- + )
- +
- + (defun calcFunc-relch (x y)
- + (if (and (math-objectp x) (math-objectp y))
- + (math-div (math-sub y x) x)
- + (list 'calcFunc-relch x y))
- )
-
-
- No differences encountered
- No differences encountered
- *** calc-comp.el Sun Oct 27 14:58:02 1991
- --- ../dist/calc-comp.el Thu Nov 21 23:25:24 1991
- ***************
- *** 61,70 ****
- ((math-scalarp a)
- (if (or (eq (car-safe a) 'frac)
- (and (nth 1 calc-frac-format) (Math-integerp a)))
- ! (if (memq calc-language '(tex eqn math))
- (let ((aa (math-adjust-fraction a))
- (calc-frac-format nil))
- ! (math-compose-expr (list '/ (nth 1 aa) (nth 2 aa)) prec))
- (if (and (eq calc-language 'big)
- (= (length (car calc-frac-format)) 1))
- (let* ((aa (math-adjust-fraction a))
- --- 61,74 ----
- ((math-scalarp a)
- (if (or (eq (car-safe a) 'frac)
- (and (nth 1 calc-frac-format) (Math-integerp a)))
- ! (if (memq calc-language '(tex eqn math maple c fortran pascal))
- (let ((aa (math-adjust-fraction a))
- (calc-frac-format nil))
- ! (math-compose-expr (list '/
- ! (if (memq calc-language '(c fortran))
- ! (math-float (nth 1 aa))
- ! (nth 1 aa))
- ! (nth 2 aa)) prec))
- (if (and (eq calc-language 'big)
- (= (length (car calc-frac-format)) 1))
- (let* ((aa (math-adjust-fraction a))
- ***************
- *** 344,350 ****
- (a2 (math-compose-expr (nth 2 a) 0)))
- (if (or (eq (car-safe a1) 'subscr)
- (and (eq (car-safe a1) 'tag)
- ! (eq (car-safe (nth 2 a1)) 'subscr)))
- (list 'subscr
- (nth 1 a1)
- (list 'horiz
- --- 348,355 ----
- (a2 (math-compose-expr (nth 2 a) 0)))
- (if (or (eq (car-safe a1) 'subscr)
- (and (eq (car-safe a1) 'tag)
- ! (eq (car-safe (nth 2 a1)) 'subscr)
- ! (setq a1 (nth 2 a1))))
- (list 'subscr
- (nth 1 a1)
- (list 'horiz
- ***************
- *** 381,387 ****
- (eq (nth 2 (nth 1 a)) 0)))
- (list 'horiz "(" (math-compose-expr (nth 1 a) 0) ")")
- (math-compose-expr (nth 1 a) 201))
- ! (let ((calc-language 'flat))
- (math-compose-expr (nth 2 a) 0))))
- ((and (eq (car a) '/)
- (eq calc-language 'big))
- --- 386,393 ----
- (eq (nth 2 (nth 1 a)) 0)))
- (list 'horiz "(" (math-compose-expr (nth 1 a) 0) ")")
- (math-compose-expr (nth 1 a) 201))
- ! (let ((calc-language 'flat)
- ! (calc-number-radix 10))
- (math-compose-expr (nth 2 a) 0))))
- ((and (eq (car a) '/)
- (eq calc-language 'big))
- ***************
- *** 701,707 ****
- (equal (car op) "**")
- (and (equal (car op) "*")
- (math-comp-last-char lhs)
- ! (math-comp-first-char rhs)))
- (car op)
- (if (and (eq calc-language 'big)
- (equal (car op) "=>"))
- --- 707,716 ----
- (equal (car op) "**")
- (and (equal (car op) "*")
- (math-comp-last-char lhs)
- ! (math-comp-first-char rhs))
- ! (and (equal (car op) "/")
- ! (math-num-integerp (nth 1 a))
- ! (math-integerp (nth 2 a))))
- (car op)
- (if (and (eq calc-language 'big)
- (equal (car op) "=>"))
- No differences encountered
- No differences encountered
- *** calc-ext.el Sun Oct 27 14:57:30 1991
- --- ../dist/calc-ext.el Thu Nov 21 23:24:42 1991
- ***************
- *** 1,4 ****
- ! ;; Calculator for GNU Emacs version 2.00, part II
- ;; Copyright (C) 1990, 1991 Free Software Foundation, Inc.
- ;; Written by Dave Gillespie, daveg@csvax.cs.caltech.edu.
-
- --- 1,4 ----
- ! ;; Calculator for GNU Emacs version 2.01, part II
- ;; Copyright (C) 1990, 1991 Free Software Foundation, Inc.
- ;; Written by Dave Gillespie, daveg@csvax.cs.caltech.edu.
-
- ***************
- *** 94,99 ****
- --- 94,100 ----
- (define-key calc-mode-map "\C-_" 'calc-undo)
- (define-key calc-mode-map "\C-xu" 'calc-undo)
- (define-key calc-mode-map "\M-\C-m" 'calc-last-args)
- + (define-key calc-mode-map "\M-%" 'calc-percent)
-
- (define-key calc-mode-map "a" nil)
- (define-key calc-mode-map "a?" 'calc-a-prefix-help)
- ***************
- *** 171,176 ****
- --- 172,178 ----
- (define-key calc-mode-map "bT" 'calc-fin-rate)
- (define-key calc-mode-map "bY" 'calc-fin-syd)
- (define-key calc-mode-map "b#" 'calc-fin-nper)
- + (define-key calc-mode-map "b%" 'calc-percent-change)
-
- (define-key calc-mode-map "c" nil)
- (define-key calc-mode-map "c?" 'calc-c-prefix-help)
- ***************
- *** 182,187 ****
- --- 184,190 ----
- (define-key calc-mode-map "cr" 'calc-to-radians)
- (define-key calc-mode-map "cC" 'calc-cos)
- (define-key calc-mode-map "cF" 'calc-fraction)
- + (define-key calc-mode-map "c%" 'calc-convert-percent)
-
- (define-key calc-mode-map "d" nil)
- (define-key calc-mode-map "d?" 'calc-d-prefix-help)
- ***************
- *** 620,627 ****
- (cdr (aref calc-mode-map i))))))
- (setq i (1+ i))))
-
- ! (setq calc-alg-map (copy-keymap calc-mode-map)
- ! calc-alg-esc-map (copy-keymap esc-map))
- (let ((i 32))
- (while (< i 127)
- (or (memq i '(?' ?` ?= ??))
- --- 623,630 ----
- (cdr (aref calc-mode-map i))))))
- (setq i (1+ i))))
-
- ! (setq calc-alg-map (copy-sequence calc-mode-map)
- ! calc-alg-esc-map (copy-sequence esc-map))
- (let ((i 32))
- (while (< i 127)
- (or (memq i '(?' ?` ?= ??))
- ***************
- *** 690,697 ****
- calcFunc-fround calcFunc-frounde calcFunc-froundu calcFunc-ftrunc
- calcFunc-idiv calcFunc-incr calcFunc-mant calcFunc-max calcFunc-min
- calcFunc-mod calcFunc-mul calcFunc-neg calcFunc-percent calcFunc-pow
- ! calcFunc-round calcFunc-rounde calcFunc-roundu calcFunc-scf
- ! calcFunc-sub calcFunc-xpon math-abs math-abs-approx
- math-add-objects-fancy math-add-or-sub math-add-symb-fancy
- math-ceiling math-combine-prod math-combine-sum math-div-by-zero
- math-div-objects-fancy math-div-symb-fancy math-div-zero
- --- 693,700 ----
- calcFunc-fround calcFunc-frounde calcFunc-froundu calcFunc-ftrunc
- calcFunc-idiv calcFunc-incr calcFunc-mant calcFunc-max calcFunc-min
- calcFunc-mod calcFunc-mul calcFunc-neg calcFunc-percent calcFunc-pow
- ! calcFunc-relch calcFunc-round calcFunc-rounde calcFunc-roundu
- ! calcFunc-scf calcFunc-sub calcFunc-xpon math-abs math-abs-approx
- math-add-objects-fancy math-add-or-sub math-add-symb-fancy
- math-ceiling math-combine-prod math-combine-sum math-div-by-zero
- math-div-objects-fancy math-div-symb-fancy math-div-zero
- ***************
- *** 739,749 ****
- calc-do-embedded-activate calc-embedded-evaluate-expr
- calc-embedded-modes-change calc-embedded-var-change)
-
- ! ("calc-fin" calc-Need-calc-fin calcFunc-ddb calcFunc-fv calcFunc-fvb
- ! calcFunc-fvl calcFunc-irr calcFunc-irrb calcFunc-nper calcFunc-nperb
- ! calcFunc-nperl calcFunc-npv calcFunc-npvb calcFunc-pmt calcFunc-pmtb
- ! calcFunc-pv calcFunc-pvb calcFunc-pvl calcFunc-rate calcFunc-rateb
- ! calcFunc-ratel calcFunc-sln calcFunc-syd)
-
- ("calc-forms" calc-Need-calc-forms calcFunc-date calcFunc-day
- calcFunc-dsadj calcFunc-hms calcFunc-hour calcFunc-incmonth
- --- 742,752 ----
- calc-do-embedded-activate calc-embedded-evaluate-expr
- calc-embedded-modes-change calc-embedded-var-change)
-
- ! ("calc-fin" calc-Need-calc-fin calc-to-percentage calcFunc-ddb
- ! calcFunc-fv calcFunc-fvb calcFunc-fvl calcFunc-irr calcFunc-irrb
- ! calcFunc-nper calcFunc-nperb calcFunc-nperl calcFunc-npv calcFunc-npvb
- ! calcFunc-pmt calcFunc-pmtb calcFunc-pv calcFunc-pvb calcFunc-pvl
- ! calcFunc-rate calcFunc-rateb calcFunc-ratel calcFunc-sln calcFunc-syd)
-
- ("calc-forms" calc-Need-calc-forms calcFunc-date calcFunc-day
- calcFunc-dsadj calcFunc-hms calcFunc-hour calcFunc-incmonth
- ***************
- *** 951,959 ****
- calc-embedded-select calc-embedded-update-formula calc-embedded-word
- calc-find-globals calc-show-plain)
-
- ! ("calc-fin" calc-fin-ddb calc-fin-fv calc-fin-irr calc-fin-nper
- ! calc-fin-npv calc-fin-pmt calc-fin-pv calc-fin-rate calc-fin-sln
- ! calc-fin-syd)
-
- ("calc-forms" calc-convert-time-zones calc-date calc-date-notation
- calc-date-part calc-from-hms calc-hms-mode calc-hms-notation
- --- 954,963 ----
- calc-embedded-select calc-embedded-update-formula calc-embedded-word
- calc-find-globals calc-show-plain)
-
- ! ("calc-fin" calc-convert-percent calc-fin-ddb calc-fin-fv
- ! calc-fin-irr calc-fin-nper calc-fin-npv calc-fin-pmt calc-fin-pv
- ! calc-fin-rate calc-fin-sln calc-fin-syd calc-percent
- ! calc-percent-change)
-
- ("calc-forms" calc-convert-time-zones calc-date calc-date-notation
- calc-date-part calc-from-hms calc-hms-mode calc-hms-notation
- ***************
- *** 1234,1243 ****
- (setq calc-prefix-help-phase 0)
- (if key
- (if msgs
- ! (message (concat group ": " (car msgs) ": "
- ! (char-to-string key) "-"))
- ! (message (concat group ": (none) " (char-to-string key) "-")))
- ! (message (concat group ": " (car msgs)))))
- (and key
- (setq unread-command-char key)))
- )
- --- 1238,1246 ----
- (setq calc-prefix-help-phase 0)
- (if key
- (if msgs
- ! (message "%s: %s: %c-" group (car msgs) key)
- ! (message "%s: (none) %c-" group (car msgs) key))
- ! (message "%s: %s" group (car msgs))))
- (and key
- (setq unread-command-char key)))
- )
- *** calc-fin.el Sun Oct 27 14:57:57 1991
- --- ../dist/calc-fin.el Thu Nov 21 23:25:08 1991
- ***************
- *** 84,97 ****
- (defun calc-fin-rate ()
- (interactive)
- (calc-slow-wrapper
- ! (if (calc-is-hyperbolic)
- ! (calc-enter-result 3 "ratl" (cons 'calcFunc-ratel
- ! (calc-top-list-n 3)))
- ! (if (calc-is-inverse)
- ! (calc-enter-result 3 "ratb" (cons 'calcFunc-rateb
- ! (calc-top-list-n 3)))
- ! (calc-enter-result 3 "rate" (cons 'calcFunc-rate
- ! (calc-top-list-n 3))))))
- )
-
- (defun calc-fin-irr (arg)
- --- 84,98 ----
- (defun calc-fin-rate ()
- (interactive)
- (calc-slow-wrapper
- ! (calc-pop-push-record 3
- ! (if (calc-is-hyperbolic) "ratl"
- ! (if (calc-is-inverse) "ratb" "rate"))
- ! (calc-to-percentage
- ! (calc-normalize
- ! (cons (if (calc-is-hyperbolic) 'calcFunc-ratel
- ! (if (calc-is-hyperbolic) 'calcFunc-rateb
- ! 'calcFunc-rate))
- ! (calc-top-list-n 3))))))
- )
-
- (defun calc-fin-irr (arg)
- ***************
- *** 120,125 ****
- --- 121,156 ----
- (calc-enter-result 4 "ddb" (cons 'calcFunc-ddb (calc-top-list-n 4))))
- )
-
- +
- + (defun calc-to-percentage (x)
- + (cond ((Math-objectp x)
- + (setq x (math-mul x 100))
- + (if (Math-num-integerp x)
- + (setq x (math-trunc x)))
- + (list 'calcFunc-percent x))
- + ((Math-vectorp x)
- + (cons 'vec (mapcar 'calc-to-percentage (cdr x))))
- + (t x))
- + )
- +
- + (defun calc-convert-percent ()
- + (interactive)
- + (calc-slow-wrapper
- + (calc-pop-push-record 1 "c%" (calc-to-percentage (calc-top-n 1))))
- + )
- +
- + (defun calc-percent ()
- + (interactive)
- + (calc-slow-wrapper
- + (calc-pop-push-record 1 "%" (list 'calcFunc-percent (calc-top-n 1))))
- + )
- +
- + (defun calc-percent-change ()
- + (interactive)
- + (calc-slow-wrapper
- + (let ((res (calc-normalize (cons 'calcFunc-relch (calc-top-list 2)))))
- + (calc-pop-push-record 2 "%ch" (calc-to-percentage res))))
- + )
-
-
-
- No differences encountered
- No differences encountered
- No differences encountered
- No differences encountered
- *** calc-help.el Sun Oct 27 14:57:49 1991
- --- ../dist/calc-help.el Thu Nov 21 23:24:43 1991
- ***************
- *** 297,303 ****
- (if inv (setq desc (concat "I " desc)))
- (if hyp (setq desc (concat "H " desc)))
- (calc-describe-thing desc "Key Index" nil
- ! (> (length desc) (length key))))))
- )
-
- (defun calc-describe-function (&optional func)
- --- 297,303 ----
- (if inv (setq desc (concat "I " desc)))
- (if hyp (setq desc (concat "H " desc)))
- (calc-describe-thing desc "Key Index" nil
- ! (string-match "[A-Z][A-Z][A-Z]" desc)))))
- )
-
- (defun calc-describe-function (&optional func)
- ***************
- *** 572,578 ****
- '("And, Or, Xor, Diff, Not; Wordsize, Clip"
- "Lshift, Rshift, roTate; SHIFT + signed Lshift, Rshift"
- "SHIFT + business: Pv, Npv, Fv, pMt, #pmts, raTe, Irr"
- ! "SHIFT + business: Sln, sYd, Ddb")
- "binary/bus" ?b)
- )
-
- --- 572,578 ----
- '("And, Or, Xor, Diff, Not; Wordsize, Clip"
- "Lshift, Rshift, roTate; SHIFT + signed Lshift, Rshift"
- "SHIFT + business: Pv, Npv, Fv, pMt, #pmts, raTe, Irr"
- ! "SHIFT + business: Sln, sYd, Ddb; %ch")
- "binary/bus" ?b)
- )
-
- ***************
- *** 580,586 ****
- (defun calc-c-prefix-help ()
- (interactive)
- (calc-do-prefix-help
- ! '("Deg, Rad, HMS; Float; Polar/rect; Clean, 0-9"
- "SHIFT + Fraction")
- "convert" ?c)
- )
- --- 580,586 ----
- (defun calc-c-prefix-help ()
- (interactive)
- (calc-do-prefix-help
- ! '("Deg, Rad, HMS; Float; Polar/rect; Clean, 0-9; %"
- "SHIFT + Fraction")
- "convert" ?c)
- )
- No differences encountered
- *** calc-keypd.el Sun Oct 27 14:58:02 1991
- --- ../dist/calc-keypd.el Thu Nov 21 23:25:25 1991
- ***************
- *** 65,71 ****
- (put 'calc-keypad 'mode-class 'special)
- (make-local-variable 'calc-main-buffer)
- (setq calc-main-buffer calcbuf)
- ! (calc-keypad-redraw)))
- (let ((width 29)
- (height 17)
- win old-win)
- --- 65,72 ----
- (put 'calc-keypad 'mode-class 'special)
- (make-local-variable 'calc-main-buffer)
- (setq calc-main-buffer calcbuf)
- ! (calc-keypad-redraw)
- ! (calc-trail-buffer)))
- (let ((width 29)
- (height 17)
- win old-win)
- No differences encountered
- No differences encountered
- *** calc-maint.el Sun Oct 27 14:57:47 1991
- --- ../dist/calc-maint.el Thu Nov 21 23:24:03 1991
- ***************
- *** 319,325 ****
- )
-
- (defun calc-private-autoloads ()
- ! "Modify the public \"default\" file to contain the necessary autoload and
- global-set-key commands for Calc."
- (interactive)
- (let ((home default-directory))
- --- 319,325 ----
- )
-
- (defun calc-private-autoloads ()
- ! "Modify the user's \".emacs\" file to contain the necessary autoload and
- global-set-key commands for Calc."
- (interactive)
- (let ((home default-directory))
- ***************
- *** 361,367 ****
- \(setq load-path (append load-path (list \"" (directory-file-name home) "\")))
- \(global-set-key \"\\e#\" 'calc-dispatch)
- ;;; End of Calc autoloads.\n")
- ! (save-buffer)
- )
-
-
- --- 361,368 ----
- \(setq load-path (append load-path (list \"" (directory-file-name home) "\")))
- \(global-set-key \"\\e#\" 'calc-dispatch)
- ;;; End of Calc autoloads.\n")
- ! (let ((trim-versions-without-asking t))
- ! (save-buffer))
- )
-
-
- *** calc-map.el Sun Oct 27 14:58:00 1991
- --- ../dist/calc-map.el Thu Nov 21 23:25:20 1991
- ***************
- *** 583,589 ****
- ( ?S 3 calcFunc-sln )
- ( ?T 3 calcFunc-rate )
- ( ?Y 4 calcFunc-syd )
- ! ( ?\# 3 calcFunc-nper ) )
- ( ( ?F 3 calcFunc-fvb )
- ( ?I 1 calcFunc-irrb )
- ( ?M 3 calcFunc-pmtb )
- --- 583,590 ----
- ( ?S 3 calcFunc-sln )
- ( ?T 3 calcFunc-rate )
- ( ?Y 4 calcFunc-syd )
- ! ( ?\# 3 calcFunc-nper )
- ! ( ?\% 2 calcFunc-relch ) )
- ( ( ?F 3 calcFunc-fvb )
- ( ?I 1 calcFunc-irrb )
- ( ?M 3 calcFunc-pmtb )
- No differences encountered
- No differences encountered
- *** calc-misc.el Sun Oct 27 14:57:48 1991
- --- ../dist/calc-misc.el Thu Nov 21 23:24:11 1991
- ***************
- *** 282,288 ****
- "Prefix keys: Trail/time, Units/statistics, Vector/matrix"
- "Prefix keys: Z (user), SHIFT + Z (define)"
- "Prefix keys: prefix + ? gives further help for that prefix"
- ! " Calc 2.00 by Dave Gillespie, daveg@csvax.cs.caltech.edu")))
- (if calc-full-help-flag
- msgs
- (if (or calc-inverse-flag calc-hyperbolic-flag)
- --- 282,288 ----
- "Prefix keys: Trail/time, Units/statistics, Vector/matrix"
- "Prefix keys: Z (user), SHIFT + Z (define)"
- "Prefix keys: prefix + ? gives further help for that prefix"
- ! " Calc 2.01 by Dave Gillespie, daveg@csvax.cs.caltech.edu")))
- (if calc-full-help-flag
- msgs
- (if (or calc-inverse-flag calc-hyperbolic-flag)
- No differences encountered
- *** calc-poly.el Sun Oct 27 14:58:01 1991
- --- ../dist/calc-poly.el Thu Nov 21 23:25:22 1991
- ***************
- *** 847,854 ****
- (defun calcFunc-nrat (expr)
- (if (math-any-floats expr)
- (setq expr (calcFunc-pfrac expr)))
- ! (if (math-vectorp expr)
- ! (cons 'vec (mapcar 'calcFunc-nrat (cdr expr)))
- (let* ((calc-prefer-frac t)
- (res (math-to-ratpoly expr))
- (num (math-simplify (math-sort-terms (calcFunc-expand (car res)))))
- --- 847,855 ----
- (defun calcFunc-nrat (expr)
- (if (math-any-floats expr)
- (setq expr (calcFunc-pfrac expr)))
- ! (if (or (math-vectorp expr)
- ! (assq (car-safe expr) calc-tweak-eqn-table))
- ! (cons (car expr) (mapcar 'calcFunc-nrat (cdr expr)))
- (let* ((calc-prefer-frac t)
- (res (math-to-ratpoly expr))
- (num (math-simplify (math-sort-terms (calcFunc-expand (car res)))))
- No differences encountered
- No differences encountered
- No differences encountered
- No differences encountered
- *** calc-sel.el Sun Oct 27 14:57:53 1991
- --- ../dist/calc-sel.el Thu Nov 21 23:24:55 1991
- ***************
- *** 67,73 ****
-
- (defun calc-select-once-maybe (num)
- (interactive "P")
- ! (calc-select-once num t t)
- )
-
- (defun calc-select-additional ()
- --- 67,73 ----
-
- (defun calc-select-once-maybe (num)
- (interactive "P")
- ! (calc-select-here num t t)
- )
-
- (defun calc-select-additional ()
- No differences encountered
- No differences encountered
- No differences encountered
- No differences encountered
- No differences encountered
- *** calc-units.el Sun Oct 27 14:58:00 1991
- --- ../dist/calc-units.el Thu Nov 21 23:25:18 1991
- ***************
- *** 731,737 ****
- u1
- u2)))
- ((eq (car expr) '/)
- ! (if (math-units-in-expr-p (nth 2 expr))
- 'wrong
- (math-single-units-in-expr-p (nth 1 expr))))
- (t 'wrong))
- --- 731,737 ----
- u1
- u2)))
- ((eq (car expr) '/)
- ! (if (math-units-in-expr-p (nth 2 expr) nil)
- 'wrong
- (math-single-units-in-expr-p (nth 1 expr))))
- (t 'wrong))
- No differences encountered
- No differences encountered
- No differences encountered
- *** calc.texinfo Sun Oct 27 14:57:47 1991
- --- ../dist/calc.texinfo Thu Nov 21 23:24:03 1991
- ***************
- *** 3,9 ****
- @c smallbook
- @setfilename calc.info
- @c [title]
- ! @settitle GNU Emacs Calc 2.00 Manual
- @setchapternewpage odd
- @comment %**end of header (This is for running Texinfo on a region.)
-
- --- 3,9 ----
- @c smallbook
- @setfilename calc.info
- @c [title]
- ! @settitle GNU Emacs Calc 2.01 Manual
- @setchapternewpage odd
- @comment %**end of header (This is for running Texinfo on a region.)
-
- ***************
- *** 98,107 ****
- @sp 6
- @center @titlefont{Calc Manual}
- @sp 4
- ! @center GNU Emacs Calc Version 2.00
- @c [volume]
- @sp 1
- ! @center October 1991
- @sp 5
- @center Dave Gillespie
- @center daveg@@synaptics.com
- --- 98,107 ----
- @sp 6
- @center @titlefont{Calc Manual}
- @sp 4
- ! @center GNU Emacs Calc Version 2.01
- @c [volume]
- @sp 1
- ! @center November 1991
- @sp 5
- @center Dave Gillespie
- @center daveg@@synaptics.com
- ***************
- *** 140,146 ****
- @ichapter The GNU Emacs Calculator
-
- @noindent
- ! @dfn{Calc 2.00} is an advanced desk calculator and mathematical tool
- that runs as part of the GNU Emacs environment.
-
- This manual is divided into three major parts: "Getting Started," the
- --- 140,146 ----
- @ichapter The GNU Emacs Calculator
-
- @noindent
- ! @dfn{Calc 2.01} is an advanced desk calculator and mathematical tool
- that runs as part of the GNU Emacs environment.
-
- This manual is divided into three major parts: "Getting Started," the
- ***************
- *** 490,497 ****
- read is the ``Getting Started'' chapter of this manual and possibly the
- first few sections of the tutorial. As you become more comfortable with
- the program you can learn its additional features. In terms of efficiency,
- ! scope and depth, Calc cannot replace a powerful tool like Mathematica@c{\trademark}
- ! @asis{ (tm)}.
- But Calc has the advantages of convenience, portability, and availability
- of the source code. And, of course, it's free!
-
- --- 490,498 ----
- read is the ``Getting Started'' chapter of this manual and possibly the
- first few sections of the tutorial. As you become more comfortable with
- the program you can learn its additional features. In terms of efficiency,
- ! scope and depth, Calc cannot replace a powerful tool like Mathematica.
- ! @c Removed this per RMS' request:
- ! @c Mathematica@c{\trademark} @asis{ (tm)}.
- But Calc has the advantages of convenience, portability, and availability
- of the source code. And, of course, it's free!
-
- ***************
- *** 667,673 ****
-
- ...
- --**-Emacs: myfile (Fundamental)----All----------------------
- ! --- Emacs Calculator Mode --- |Emacs Calc Mode v2.00...
- 2: 17.3 | 17.3
- 1: -5 | 3
- . | 2
- --- 668,674 ----
-
- ...
- --**-Emacs: myfile (Fundamental)----All----------------------
- ! --- Emacs Calculator Mode --- |Emacs Calc Mode v2.01...
- 2: 17.3 | 17.3
- 1: -5 | 3
- . | 2
- ***************
- *** 789,795 ****
- |1: -5
- | .
- |--%%-Calc: 12 Deg (Calcul
- ! |----+-----Calc 2.00-----+----1
- |FLR |CEIL|RND |TRNC|CLN2|FLT |
- |----+----+----+----+----+----|
- | LN |EXP | |ABS |IDIV|MOD |
- --- 790,796 ----
- |1: -5
- | .
- |--%%-Calc: 12 Deg (Calcul
- ! |----+-----Calc 2.01-----+----1
- |FLR |CEIL|RND |TRNC|CLN2|FLT |
- |----+----+----+----+----+----|
- | LN |EXP | |ABS |IDIV|MOD |
- ***************
- *** 5244,5250 ****
-
- @group
- @smallexample
- ! 2: 34*x - 24*pow(x, 3) 2: 34*x - 24*x ** 3
- 1: @{sqrt(51) / 6, sqrt(51) / -6, 0@} 1: /sqrt(51) / 6, sqrt(51) / -6, 0/
- . .
-
- --- 5245,5251 ----
-
- @group
- @smallexample
- ! 2: 34*x - 24*pow(x, 3) 2: 34*x - 24*x**3
- 1: @{sqrt(51) / 6, sqrt(51) / -6, 0@} 1: /sqrt(51) / 6, sqrt(51) / -6, 0/
- . .
-
- ***************
- *** 5273,5279 ****
- Notice that @samp{sqrt(51)} may cause problems with older
- implementations of C and FORTRAN, which would require something more
- like @samp{sqrt(51.0)}. It is always wise to check over the formulas
- ! produced by the various language modes to make sure they fully correct.
-
- Type @kbd{m s}, @kbd{m f}, and @kbd{d N} to reset these modes. (You
- may prefer to remain in Big mode, but all the examples in the tutorial
- --- 5274,5281 ----
- Notice that @samp{sqrt(51)} may cause problems with older
- implementations of C and FORTRAN, which would require something more
- like @samp{sqrt(51.0)}. It is always wise to check over the formulas
- ! produced by the various language modes to make sure they are fully
- ! correct.
-
- Type @kbd{m s}, @kbd{m f}, and @kbd{d N} to reset these modes. (You
- may prefer to remain in Big mode, but all the examples in the tutorial
- ***************
- *** 5433,5439 ****
- @noindent
- where @cite{n} (which must be even) is the number of slices and @cite{h}
- is the width of each slice. These are 10 and 0.1 in our example.
- ! For reference, here is the corresponding equation for the stairstep
- method:
-
- @ifinfo
- --- 5435,5441 ----
- @noindent
- where @cite{n} (which must be even) is the number of slices and @cite{h}
- is the width of each slice. These are 10 and 0.1 in our example.
- ! For reference, here is the corresponding formula for the stairstep
- method:
-
- @ifinfo
- ***************
- *** 5491,5498 ****
- @noindent
- If we were simplifying this by hand, we'd probably replace the
- @samp{tan} with a @samp{sin/cos} first, then combine over a common
- ! denominator. There is no Calc command to do the former; the @kbd{j M}
- ! selection command will do the latter but we'll do both with rewrite
- rules just for practice.
-
- Rewrite rules are written with the @samp{:=} symbol.
- --- 5493,5500 ----
- @noindent
- If we were simplifying this by hand, we'd probably replace the
- @samp{tan} with a @samp{sin/cos} first, then combine over a common
- ! denominator. There is no Calc command to do the former; the @kbd{a n}
- ! algebra command will do the latter but we'll do both with rewrite
- rules just for practice.
-
- Rewrite rules are written with the @samp{:=} symbol.
- ***************
- *** 11361,11367 ****
- interval @samp{[3 .. inf)} represents all real numbers greater than
- or equal to 3, and @samp{(-inf .. inf)} represents all real numbers.
- In fact, @samp{[-inf .. inf]} represents all real numbers including
- ! infinity.
-
- Intervals are entered in the notation shown here, either as algebraic
- formulas, or using incomplete forms. (@xref{Incomplete Objects}.)
- --- 11363,11369 ----
- interval @samp{[3 .. inf)} represents all real numbers greater than
- or equal to 3, and @samp{(-inf .. inf)} represents all real numbers.
- In fact, @samp{[-inf .. inf]} represents all real numbers including
- ! the real infinities.
-
- Intervals are entered in the notation shown here, either as algebraic
- formulas, or using incomplete forms. (@xref{Incomplete Objects}.)
- ***************
- *** 11405,11410 ****
- --- 11407,11423 ----
- be 0 for @samp{(..)}, 1 for @samp{(..]}, 2 for @samp{[..)}, or
- 3 for @samp{[..]}.
-
- + Please note that in fully rigorous interval arithmetic, care would be
- + taken to make sure that computation of the lower bound rounds toward
- + minus infinity, while upper bound computations round toward plus
- + infinity. Calc's arithmetic always uses a round-to-nearest mode,
- + which means that roundoff errors could creep into an interval
- + calculation to produce intervals slightly smaller than they ought to
- + be. For example, entering @samp{[1..2]} and pressing @kbd{Q 2 ^}
- + should yield the interval @samp{[1..2]}, but in fact it yields the
- + (slightly too small) interval @samp{[1..1.9999999]} due to roundoff
- + error.
- +
- @node Incomplete Objects, Variables, Interval Forms, Data Types
- @section Incomplete Objects
-
- ***************
- *** 11742,11751 ****
-
- @kindex M-DEL
- @pindex calc-pop-above
- ! The @kbd{M-DEL} (@code{calc-pop-above}) command is to @kbd{DEL} what
- ! @kbd{LFD} is to @kbd{RET}, i.e., it interprets the sign of the numeric
- prefix argument in the opposite way, and the default argument is 2.
- ! Thus @kbd{M-DEL} by itself removes the second-from-top stack element,
- leaving the first, third, fourth, and so on; @kbd{M-3 M-DEL} deletes
- the third stack element.
-
- --- 11755,11764 ----
-
- @kindex M-DEL
- @pindex calc-pop-above
- ! The @key{M-DEL} (@code{calc-pop-above}) command is to @key{DEL} what
- ! @key{LFD} is to @key{RET}, i.e., it interprets the sign of the numeric
- prefix argument in the opposite way, and the default argument is 2.
- ! Thus @key{M-DEL} by itself removes the second-from-top stack element,
- leaving the first, third, fourth, and so on; @kbd{M-3 M-DEL} deletes
- the third stack element.
-
- ***************
- *** 14245,14251 ****
- @samp{string([65, 66, 67])} and can still be manipulated this way; for
- example, the selection and vector commands @kbd{j 1 v v j u} would
- select the vector portion of this object and reverse the elements, then
- ! deselect to reveal a string whose characters have been reversed.
-
- The composition functions do the same thing in all language modes
- (although their components will of course be formatted in the current
- --- 14258,14264 ----
- @samp{string([65, 66, 67])} and can still be manipulated this way; for
- example, the selection and vector commands @kbd{j 1 v v j u} would
- select the vector portion of this object and reverse the elements, then
- ! deselect to reveal a string whose characters had been reversed.
-
- The composition functions do the same thing in all language modes
- (although their components will of course be formatted in the current
- ***************
- *** 16167,16193 ****
- key followed by a shifted letter. (The @kbd{b} prefix followed by
- a lower-case letter is used for operations on binary numbers.)
-
- ! @tindex %
- ! @tindex percent
- ! Since many of these functions have @var{rate} arguments which would
- ! normally be written as percentages, Calc accepts the notation
- ! @samp{@var{x}%} during algebraic entry. This is equivalent to
- ! @samp{@var{x} * .01}. In other words, the @var{rate} argument
- ! to these functions wants something like @samp{8%} or @samp{.08}
- ! as a value, @emph{not} 8 (which would correspond to a rate of
- ! 800%!).
-
- ! Also note that the rate and the number of intervals must be on the
- ! same time scale, e.g., months or years. Mixing an annual interest
- ! rate with a time expressed in months will give you very wrong
- ! answers!
- !
- ! Finally, it is wise to compute these functions to a higher precision
- ! than you really need, just to make sure your answer is correct to
- ! the last penny; also, you may wish to check the definitions at the end
- of this section to make sure the functions have the meaning you expect.
-
- @menu
- * Future Value::
- * Present Value::
- * Related Financial Functions::
- --- 16180,16197 ----
- key followed by a shifted letter. (The @kbd{b} prefix followed by
- a lower-case letter is used for operations on binary numbers.)
-
- ! Note that the rate and the number of intervals given to these
- ! functions must be on the same time scale, e.g., both months or
- ! both years. Mixing an annual interest rate with a time expressed
- ! in months will give you very wrong answers!
-
- ! It is wise to compute these functions to a higher precision than
- ! you really need, just to make sure your answer is correct to the
- ! last penny; also, you may wish to check the definitions at the end
- of this section to make sure the functions have the meaning you expect.
-
- @menu
- + * Percentages::
- * Future Value::
- * Present Value::
- * Related Financial Functions::
- ***************
- *** 16195,16201 ****
- * Definitions of Financial Functions::
- @end menu
-
- ! @node Future Value, Present Value, Financial Functions, Financial Functions
- @subsection Future Value
-
- @noindent
- --- 16199,16270 ----
- * Definitions of Financial Functions::
- @end menu
-
- ! @node Percentages, Future Value, Financial Functions, Financial Functions
- ! @subsection Percentages
- !
- ! @kindex M-%
- ! @pindex calc-percent
- ! @tindex %
- ! @tindex percent
- ! The @kbd{M-%} (@code{calc-percent}) command takes a percentage value,
- ! say 5.4, and converts it to an equivalent actual number. For example,
- ! @kbd{5.4 M-%} enters 0.054 on the stack. (That's the @key{META} or
- ! @key{ESC} key combined with @kbd{%}.)
- !
- ! Actually, @kbd{M-%} creates a formula of the form @samp{5.4%}.
- ! You can enter @samp{5.4%} yourself during algebraic entry. The
- ! @samp{%} operator simply means, ``the preceding value divided by
- ! 100.'' The @samp{%} operator has very high precedence, so that
- ! @samp{1+8%} is interpreted as @samp{1+(8%)}, not as @samp{(1+8)%}.
- ! (The @samp{%} operator is just a postfix notation for the
- ! @code{percent} function, just like @samp{20!} is the notation for
- ! @samp{fact(20)}, or twenty-factorial).
- !
- ! The formula @samp{5.4%} would normally evaluate immediately to
- ! 0.054, but the @kbd{M-%} command suppresses evaluation as it puts
- ! the formula onto the stack. However, the next Calc command that
- ! uses the formula @samp{5.4%} will evaluate it as its first step.
- ! The net effect is that you get to look at @samp{5.4%} on the stack,
- ! but Calc commands see it as @samp{0.054}, which is what they expect.
- !
- ! In particular, @samp{5.4%} and @samp{0.054} are suitable values
- ! for the @var{rate} arguments of the various financial functions,
- ! but the number @samp{5.4} is probably @emph{not} suitable---it
- ! represents a rate of 540 percent!
- !
- ! The key sequence @kbd{M-% *} effectively means ``percent-of.''
- ! For example, @kbd{68 RET 25 M-% *} computes 17, which is 25% of
- ! 68 (and also 68% of 25, which comes out to the same thing).
- !
- ! @kindex c %
- ! @pindex calc-convert-percent
- ! The @kbd{c %} (@code{calc-convert-percent}) command converts the
- ! value on the top of the stack from numeric to percentage form.
- ! For example, if 0.08 is on the stack, @kbd{c %} converts it to
- ! @samp{8%}. The quantity is the same, it's just represented
- ! differently. (Contrast this with @kbd{M-%}, which would convert
- ! this number to @samp{0.08%}.) The @kbd{=} key is a convenient way
- ! to convert a formula like @samp{8%} back to numeric form, 0.08.
- !
- ! To compute what percentage one quantity is of another quantity,
- ! use @kbd{/ c %}. For example, @kbd{17 RET 68 / c %} displays
- ! @samp{25%}.
- !
- ! @kindex b %
- ! @pindex calc-percent-change
- ! @tindex relch
- ! The @kbd{b %} (@code{calc-percent-change}) [@code{relch}] command
- ! calculates the percentage change from one number to another.
- ! For example, @kbd{40 RET 50 b %} produces the answer @samp{25%},
- ! since 50 is 25% larger than 40. A negative result represents a
- ! decrease: @kbd{50 RET 40 b %} produces @samp{-20%}, since 40 is
- ! 20% smaller than 50. (The answers are different in magnitude
- ! because, in the first case, we're increasing by 25% of 40, but
- ! in the second case, we're decreasing by 20% of 50.) The effect
- ! of @kbd{40 RET 50 b %} is to compute @cite{(50-40)/40}, converting
- ! the answer to percentage form as if by @kbd{c %}.
- !
- ! @node Future Value, Present Value, Percentages, Financial Functions
- @subsection Future Value
-
- @noindent
- ***************
- *** 16222,16228 ****
- in the account after five years? @code{fvb(5.4%, 5, 1000) = 5870.73}.
- Thus you will have earned $870 worth of interest over the years.
- Using the stack, this calculation would have been
- ! @kbd{.054 RET 5 RET 1000 I b F}. Note that the rate is expressed
- as a number between 0 and 1, @emph{not} as a percentage.
-
- @kindex H b F
- --- 16291,16297 ----
- in the account after five years? @code{fvb(5.4%, 5, 1000) = 5870.73}.
- Thus you will have earned $870 worth of interest over the years.
- Using the stack, this calculation would have been
- ! @kbd{5.4 M-% 5 RET 1000 I b F}. Note that the rate is expressed
- as a number between 0 and 1, @emph{not} as a percentage.
-
- @kindex H b F
- ***************
- *** 16401,16407 ****
- the rate of return on an investment. This is also an inverse of @code{pv}:
- @code{rate(@var{n}, @var{payment}, @var{amount})} computes the value of
- @var{rate} such that @code{pv(@var{rate}, @var{n}, @var{payment}) =
- ! @var{amount}}.@refill
-
- @kindex I b T
- @tindex H b T
- --- 16470,16476 ----
- the rate of return on an investment. This is also an inverse of @code{pv}:
- @code{rate(@var{n}, @var{payment}, @var{amount})} computes the value of
- @var{rate} such that @code{pv(@var{rate}, @var{n}, @var{payment}) =
- ! @var{amount}}. The result is expressed as a formula like @samp{6.3%}.@refill
-
- @kindex I b T
- @tindex H b T
- ***************
- *** 16412,16418 ****
- in place of @code{pv}. Also, @code{rate} and @code{rateb} can
- accept an optional fourth argument just like @code{pv} and @code{pvb}.
- To redo the above example from a different perspective,
- ! @code{ratel(9, 2000, 1000) = .08}, which says you will need an
- interest rate of 8% in order to double your account in nine years.@refill
-
- @kindex b I
- --- 16481,16487 ----
- in place of @code{pv}. Also, @code{rate} and @code{rateb} can
- accept an optional fourth argument just like @code{pv} and @code{pvb}.
- To redo the above example from a different perspective,
- ! @code{ratel(9, 2000, 1000) = 8.00597%}, which says you will need an
- interest rate of 8% in order to double your account in nine years.@refill
-
- @kindex b I
- ***************
- *** 27406,27412 ****
-
- @group
- @smallexample
- ! |----+-----Calc 2.00-----+----1
- |FLR |CEIL|RND |TRNC|CLN2|FLT |
- |----+----+----+----+----+----|
- | LN |EXP | |ABS |IDIV|MOD |
- --- 27475,27481 ----
-
- @group
- @smallexample
- ! |----+-----Calc 2.01-----+----1
- |FLR |CEIL|RND |TRNC|CLN2|FLT |
- |----+----+----+----+----+----|
- | LN |EXP | |ABS |IDIV|MOD |
- ***************
- *** 32336,32342 ****
- @appendix Installation
-
- @noindent
- ! Calc 2.00 comes as a set of GNU Emacs Lisp files, with names like
- @file{calc.el} and @file{calc-ext.el}, and also as a @file{calc.texinfo}
- file which can be used to generate both on-line and printed
- documentation.@refill
- --- 32405,32411 ----
- @appendix Installation
-
- @noindent
- ! Calc 2.01 comes as a set of GNU Emacs Lisp files, with names like
- @file{calc.el} and @file{calc-ext.el}, and also as a @file{calc.texinfo}
- file which can be used to generate both on-line and printed
- documentation.@refill
- ***************
- *** 32506,32515 ****
- Unless you have installed the Calc files in Emacs' main @file{lisp/}
- directory, you will also have to add a command that looks like the
- following to tell Emacs where to find them. In this example, we
- ! have put the files in directory @file{/usr/gnu/src/calc-2.00}.
-
- @smallexample
- ! (setq load-path (append load-path (list "/usr/gnu/src/calc-2.00")))
- @end smallexample
-
- @noindent
- --- 32575,32584 ----
- Unless you have installed the Calc files in Emacs' main @file{lisp/}
- directory, you will also have to add a command that looks like the
- following to tell Emacs where to find them. In this example, we
- ! have put the files in directory @file{/usr/gnu/src/calc-2.01}.
-
- @smallexample
- ! (setq load-path (append load-path (list "/usr/gnu/src/calc-2.01")))
- @end smallexample
-
- @noindent
- ***************
- *** 32561,32574 ****
- @code{load-path}:
-
- @example
- ! (autoload 'calc-dispatch "calc-2.00/calc" "Calculator" t)
- @end example
-
- @noindent
- Suppose the directory @file{/usr/gnu/src/emacs/lisp} is on the path, and
- the above @code{autoload} allows Emacs to find Calc under the name
- ! @file{/usr/gnu/src/emacs/lisp/calc-2.00/calc.elc}. Then when Calc
- ! starts up it will add @file{/usr/gnu/src/emacs/lisp/calc-2.00}
- to the path so that it will later be able to find its component files.
-
- @vindex calc-autoload-directory
- --- 32630,32643 ----
- @code{load-path}:
-
- @example
- ! (autoload 'calc-dispatch "calc-2.01/calc" "Calculator" t)
- @end example
-
- @noindent
- Suppose the directory @file{/usr/gnu/src/emacs/lisp} is on the path, and
- the above @code{autoload} allows Emacs to find Calc under the name
- ! @file{/usr/gnu/src/emacs/lisp/calc-2.01/calc.elc}. Then when Calc
- ! starts up it will add @file{/usr/gnu/src/emacs/lisp/calc-2.01}
- to the path so that it will later be able to find its component files.
-
- @vindex calc-autoload-directory
- ***************
- *** 32728,32734 ****
- copy if you really need it. To print the manual, you will need the
- @TeX{} typesetting program (this is a free program by Donald Knuth
- at Stanford University) as well as the @file{texindex} program and
- ! @file{texinfo.tex} file that come with GNU Emacs.@refill
-
- To print the Calc manual in one huge 550 page tome, type @samp{make tex}.
- This will take care of running the manual through @TeX{} twice so that
- --- 32797,32804 ----
- copy if you really need it. To print the manual, you will need the
- @TeX{} typesetting program (this is a free program by Donald Knuth
- at Stanford University) as well as the @file{texindex} program and
- ! @file{texinfo.tex} file, both of which can be obtained from the FSF
- ! under the name @code{texinfo2}.@refill
-
- To print the Calc manual in one huge 550 page tome, type @samp{make tex}.
- This will take care of running the manual through @TeX{} twice so that
- ***************
- *** 32870,32876 ****
- @appendix Calc Summary
-
- @noindent
- ! This section includes a complete list of Calc 2.00 keystroke commands.
- Each line lists the stack entries used by the command (top-of-stack
- last), the keystrokes themselves, the prompts asked by the command,
- and the result of the command (also with top-of-stack last).
- --- 32940,32946 ----
- @appendix Calc Summary
-
- @noindent
- ! This section includes a complete list of Calc 2.01 keystroke commands.
- Each line lists the stack entries used by the command (top-of-stack
- last), the keystrokes themselves, the prompts asked by the command,
- and the result of the command (also with top-of-stack last).
- ***************
- *** 32884,32889 ****
- --- 32954,32960 ----
- @xref{Command Index}. @xref{Function Index}.
-
- @iftex
- + @begingroup
- @tex
- \gdef\sumrow#1{\sumrowx#1\relax}%
- \gdef\sumrowx#1\:#2\:#3\:#4\:#5\:#6\relax{%
- ***************
- *** 32978,32983 ****
- --- 33049,33055 ----
- @r{ a@: & @: @: 1 @:inv@:(a) 1/a}
- @r{ a@: ! @: @: 1 @:fact@:(a) a!}
- @r{ a@: = @: @: 1 @:evalv@:(a)}
- + @r{ a@: M-% @: @: @:percent@:(a)}
-
- @c
- @r{ ... a@: RET @: @: 1 @:@:... a a}
- ***************
- *** 33186,33191 ****
- --- 33258,33264 ----
- @r{ r p a@: b # @: @: @:nper@:(r,p,a)}
- @r{ r p a@: I b # @: @: @:nperb@:(r,p,a)}
- @r{ r p a@: H b # @: @: @:nperl@:(r,p,a)}
- + @r{ a b@: b % @: @: @:relch@:(a,b)}
-
- @c
- @r{ a@: c c @: @: 5 @:pclean@:(a,p)}
- ***************
- *** 33205,33210 ****
- --- 33278,33286 ----
- @r{ a@: H c F @: @: 5 @:frac@:(a,p)}
-
- @c
- + @r{ a@: c % @: @: @:percent@:(a*100)}
- +
- + @c
- @r{ @: d . @:char @: 50 @:calc-point-char@:}
- @r{ @: d , @:char @: 50 @:calc-group-char@:}
- @r{ @: d < @: @: 13,50 @:calc-left-justify@:}
- ***************
- *** 34068,34073 ****
- --- 34144,34150 ----
- @iftex
- (Space is provided below for you to keep your own written notes.)
- @page
- + @endgroup
- @end iftex
-
-
-
- exit 0 # Just in case...
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-