all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Devin Homan <devinwh7@gmail.com>
To: 15511@debbugs.gnu.org
Subject: bug#15511: calc fit not working in emacs 24.3
Date: Thu, 03 Oct 2013 01:03:44 -0800	[thread overview]
Message-ID: <524D32F0.6010505@gmail.com> (raw)

This bug should be reproducible by following the info example "12.8.1 Linear Fits". The function fit
function appears to not be working in Emacs 24.3.1 but it works in 23.4.1. math-general-fit calls
math-rewrite, which produces a result that is rejected by math-general-fit.

(calcFunc-fit '(+ (var a var-a) (* (var b var-b) (var x var-x))) '(var x var-x) '(vec (var a var-a)
(var b var-b)) '(vec (vec 1 2 3 4 5) (vec 5 7 9 11 13)))

should result in (+ (float 3 0) (* (float 2 0) (var x var-x))).

math-rewrite returns

in Emacs 24

(calcFunc-fitsystem 0 (vec (- (+ (* (calcFunc-fitparam 2) (calcFunc-fitvar 1)) (calcFunc-fitparam
1)) (calcFunc-fitvar 2))) (vec (calcFunc-eq (calcFunc-fitdummy 1) 1)) 0)

in Emacs 23

(calcFunc-fitsystem (calcFunc-fitvar 2) (vec 1 (calcFunc-fitvar 1)) (vec (calcFunc-fitdummy 1)
(calcFunc-fitdummy 2)))

The erroneous result is being returned on line 1664 of calcalg3.el in 24.3.1
"expr (math-rewrite (list 'calcFunc-fitmodel expr)",
which is line 1665 in 23.4.1.





             reply	other threads:[~2013-10-03  9:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-03  9:03 Devin Homan [this message]
2013-10-03 14:17 ` bug#15511: calc fit not working in emacs 24.3 Jay Belanger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=524D32F0.6010505@gmail.com \
    --to=devinwh7@gmail.com \
    --cc=15511@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.