unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15511: calc fit not working in emacs 24.3
@ 2013-10-03  9:03 Devin Homan
  2013-10-03 14:17 ` Jay Belanger
  0 siblings, 1 reply; 2+ messages in thread
From: Devin Homan @ 2013-10-03  9:03 UTC (permalink / raw)
  To: 15511

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.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#15511: calc fit not working in emacs 24.3
  2013-10-03  9:03 bug#15511: calc fit not working in emacs 24.3 Devin Homan
@ 2013-10-03 14:17 ` Jay Belanger
  0 siblings, 0 replies; 2+ messages in thread
From: Jay Belanger @ 2013-10-03 14:17 UTC (permalink / raw)
  To: Devin Homan; +Cc: 15511


> This bug should be reproducible by following the info example "12.8.1
> Linear Fits".

Thanks for catching this.  It has been fixed in the bzr version of
Emacs.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-03 14:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03  9:03 bug#15511: calc fit not working in emacs 24.3 Devin Homan
2013-10-03 14:17 ` Jay Belanger

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).