/[emacs]/emacs/lisp/calc/calc.el
ViewVC logotype

Diff of /emacs/lisp/calc/calc.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by deego, Wed Jan 15 15:16:25 2003 UTC revision 1.21 by lektu, Tue Feb 4 12:47:10 2003 UTC
# Line 3  Line 3 
3  ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002 Free Software Foundation, Inc.  ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002 Free Software Foundation, Inc.
4    
5  ;; Author: David Gillespie <daveg@synaptics.com>  ;; Author: David Gillespie <daveg@synaptics.com>
6  ;; Maintainers: D. Goel <deego@gnufans.org>  ;; Maintainers: D. Goel <deego@gnufans.org>
7  ;;              Colin Walters <walters@debian.org>  ;;              Colin Walters <walters@debian.org>
8  ;; Keywords: convenience, extensions  ;; Keywords: convenience, extensions
9  ;; Version: 2.02g  ;; Version: 2.02g
# Line 146  Line 146 
146  ;; Subject: Re: fix for `Cannot open load file: calc-alg-3'  ;; Subject: Re: fix for `Cannot open load file: calc-alg-3'
147  ;; To: walters@debian.org  ;; To: walters@debian.org
148  ;; Date: Sat, 24 Nov 2001 21:44:21 +0000 (UTC)  ;; Date: Sat, 24 Nov 2001 21:44:21 +0000 (UTC)
149  ;;  ;;
150  ;; Could you add logistic curve fitting to the current list?  ;; Could you add logistic curve fitting to the current list?
151  ;;  ;;
152  ;; (I guess the key binding for a logistic curve would have to be `s'  ;; (I guess the key binding for a logistic curve would have to be `s'
153  ;; since a logistic curve is an `s' curve; both `l' and `L' are already  ;; since a logistic curve is an `s' curve; both `l' and `L' are already
154  ;; taken for logarithms.)  ;; taken for logarithms.)
155  ;;  ;;
156  ;; Here is the current list for curve fitting;  ;; Here is the current list for curve fitting;
157  ;;  ;;
158  ;;     `1'  ;;     `1'
159  ;;          Linear or multilinear.  a + b x + c y + d z.  ;;          Linear or multilinear.  a + b x + c y + d z.
160  ;;  ;;
161  ;;     `2-9'  ;;     `2-9'
162  ;;          Polynomials.  a + b x + c x^2 + d x^3.  ;;          Polynomials.  a + b x + c x^2 + d x^3.
163  ;;  ;;
164  ;;     `e'  ;;     `e'
165  ;;          Exponential.  a exp(b x) exp(c y).  ;;          Exponential.  a exp(b x) exp(c y).
166  ;;  ;;
167  ;;     `E'  ;;     `E'
168  ;;          Base-10 exponential.  a 10^(b x) 10^(c y).  ;;          Base-10 exponential.  a 10^(b x) 10^(c y).
169  ;;  ;;
170  ;;     `x'  ;;     `x'
171  ;;          Exponential (alternate notation).  exp(a + b x + c y).  ;;          Exponential (alternate notation).  exp(a + b x + c y).
172  ;;  ;;
173  ;;     `X'  ;;     `X'
174  ;;          Base-10 exponential (alternate).  10^(a + b x + c y).  ;;          Base-10 exponential (alternate).  10^(a + b x + c y).
175  ;;  ;;
176  ;;     `l'  ;;     `l'
177  ;;          Logarithmic.  a + b ln(x) + c ln(y).  ;;          Logarithmic.  a + b ln(x) + c ln(y).
178  ;;  ;;
179  ;;     `L'  ;;     `L'
180  ;;          Base-10 logarithmic.  a + b log10(x) + c log10(y).  ;;          Base-10 logarithmic.  a + b log10(x) + c log10(y).
181  ;;  ;;
182  ;;     `^'  ;;     `^'
183  ;;          General exponential.  a b^x c^y.  ;;          General exponential.  a b^x c^y.
184  ;;  ;;
185  ;;     `p'  ;;     `p'
186  ;;          Power law.  a x^b y^c.  ;;          Power law.  a x^b y^c.
187  ;;  ;;
188  ;;     `q'  ;;     `q'
189  ;;          Quadratic.  a + b (x-c)^2 + d (x-e)^2.  ;;          Quadratic.  a + b (x-c)^2 + d (x-e)^2.
190  ;;  ;;
191  ;;     `g'  ;;     `g'
192  ;;          Gaussian.  (a / b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2).  ;;          Gaussian.  (a / b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2).
193  ;;  ;;
194  ;;  ;;
195  ;; Logistic curves are used a great deal in ecology, and in predicting  ;; Logistic curves are used a great deal in ecology, and in predicting
196  ;; human actions, such as use of different kinds of energy in a country  ;; human actions, such as use of different kinds of energy in a country
197  ;; (wood, coal, oil, natural gas, etc.) or the number of scientific  ;; (wood, coal, oil, natural gas, etc.) or the number of scientific
198  ;; papers a person publishes, or the number of movies made.  ;; papers a person publishes, or the number of movies made.
199  ;;  ;;
200  ;; (The less information on which to base the curve, the higher the error  ;; (The less information on which to base the curve, the higher the error
201  ;; rate.  Theodore Modis ran some Monte Carlo simulations and produced  ;; rate.  Theodore Modis ran some Monte Carlo simulations and produced
202  ;; what may be useful set of confidence levels for different amounts of  ;; what may be useful set of confidence levels for different amounts of
# Line 645  scientific notation in calc-mode.") Line 645  scientific notation in calc-mode.")
645  ;; The following modes use specially-formatted data.  ;; The following modes use specially-formatted data.
646  (put 'calc-mode 'mode-class 'special)  (put 'calc-mode 'mode-class 'special)
647  (put 'calc-trail-mode 'mode-class 'special)  (put 'calc-trail-mode 'mode-class 'special)
648      
649  ;; Define "inexact-result" as an e-lisp error symbol.  ;; Define "inexact-result" as an e-lisp error symbol.
650  (put 'inexact-result 'error-conditions '(error inexact-result calc-error))  (put 'inexact-result 'error-conditions '(error inexact-result calc-error))
651  (put 'inexact-result 'error-message "Calc internal error (inexact-result)")  (put 'inexact-result 'error-message "Calc internal error (inexact-result)")
652      
653  ;; Define "math-overflow" and "math-underflow" as e-lisp error symbols.  ;; Define "math-overflow" and "math-underflow" as e-lisp error symbols.
654  (put 'math-overflow 'error-conditions '(error math-overflow calc-error))  (put 'math-overflow 'error-conditions '(error math-overflow calc-error))
655  (put 'math-overflow 'error-message "Floating-point overflow occurred")  (put 'math-overflow 'error-message "Floating-point overflow occurred")
656  (put 'math-underflow 'error-conditions '(error math-underflow calc-error))  (put 'math-underflow 'error-conditions '(error math-underflow calc-error))
657  (put 'math-underflow 'error-message "Floating-point underflow occurred")  (put 'math-underflow 'error-message "Floating-point underflow occurred")
658      
659  (defconst calc-version "2.02g")  (defconst calc-version "2.02g")
660  (defconst calc-version-date "Mon Nov 19 2001")  (defconst calc-version-date "Mon Nov 19 2001")
661  (defvar calc-trail-pointer nil)         ; "Current" entry in trail buffer.  (defvar calc-trail-pointer nil)         ; "Current" entry in trail buffer.
# Line 848  scientific notation in calc-mode.") Line 848  scientific notation in calc-mode.")
848      math-find-user-tokens math-read-expr-list math-read-exprs math-read-if      math-find-user-tokens math-read-expr-list math-read-exprs math-read-if
849      math-read-token math-remove-dashes)      math-read-token math-remove-dashes)
850    
851   ("calc-misc" calc-Need-calc-misc   ("calc-misc" calc-Need-calc-misc
852      calc-do-handle-whys calc-do-refresh calc-num-prefix-name      calc-do-handle-whys calc-do-refresh calc-num-prefix-name
853      calc-record-list calc-record-why calc-report-bug calc-roll-down-stack      calc-record-list calc-record-why calc-report-bug calc-roll-down-stack
854      calc-roll-up-stack calc-temp-minibuffer-message calcFunc-floor      calc-roll-up-stack calc-temp-minibuffer-message calcFunc-floor
# Line 3364  Also looks for the equivalent TeX words, Line 3364  Also looks for the equivalent TeX words,
3364      (push (or input last-command-event) unread-command-events)))      (push (or input last-command-event) unread-command-events)))
3365    
3366  (defun calc-clear-unread-commands ()  (defun calc-clear-unread-commands ()
3367    (if (featurep 'xemacs)    (if (featurep 'xemacs)
3368          (calc-emacs-type-lucid (setq unread-command-event nil))          (calc-emacs-type-lucid (setq unread-command-event nil))
3369      (setq unread-command-events nil)))      (setq unread-command-events nil)))
3370    

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26