Build Failure in Today's CVS



Looking at the code of the lambert_w function I would like to suggest some
improvements to be consistent with the coding of a simplifying function:

1. No use of the first variable, here x. It holds the expression which we need
   at the end of the function.

2. Use instead the second variable here y for a function with one argument.

3. At the end call eqtest to ensure the correct setting of the 
   simp-flags. At this point we compare against the original expression.

5. No using of the simp-flag in expression we return. Let the work
   do by the simplifier. We do not know what rules the user would like 
   to add.

This would be the improved routine, the warning from the compiler will vanish:

(defun simp-lambertw (x y z)
  (oneargcheck x)
  (setq y (simpcheck (cadr x) z))
  (cond ((zerop1 y) y)	;bfloat case (includes all cases)
	((alike1 y '$%e)
	 ;; W(%e) = 1
	 1)
	((alike1 y '((mtimes simp) ((rat simp) -1 2) ((%log simp) 2)))
	 ;; W(-log(2)/2) = -log(2)
	 '((mtimes) -1 ((%log) 2)))
	((alike1 y '((mtimes) -1 ((mexpt) $%e -1)))
	 ;; W(-1/e) = -1
	 -1)
	((alike1 y '((mtimes) ((rat) -1 2) $%pi))
	 ;; W(-%pi/2) = %i*%pi/2
	 '((mtimes) ((rat) 1 2) $%i $%pi))
	;; W(x) is real for x real and x > -1/%e
	((and (float-numerical-eval-p y) (< (- (/ %e-val)) y))
	 (lambert-w ($float y)))
	;; Complex float x or real float x < -1/%e
	((complex-float-numerical-eval-p y)
	 (complexify (lambert-w 
		      (complex ($float ($realpart y)) ($float ($imagpart y))))))
	((complex-bigfloat-numerical-eval-p y)
	 (bfloat-lambert-w y))
	(t (eqtest (list '(%lambert_w) y) x))))

Dieter Kaiser

-----Urspr?ngliche Nachricht-----
Von: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu] Im
Auftrag von David Ronis
Gesendet: Freitag, 26. Dezember 2008 18:33
An: maxima at math.utexas.edu
Betreff: [Maxima] Build Failure in Today's CVS

After updating, bootstrapping, configuring, making clean, and trying to
build I get:


;; Compiling file /home/ronis/Project/notar/maxima/src/specfn.lisp ...
WARNING in SIMP-LAMBERTW in lines 462..489 :
variable Y is not used.
Misspelled or missing IGNORE declaration?
*** - SYSTEM::LINE-COMMENT-READER: Invalid byte #x92 in CHARSET:ASCII
      conversion

The following functions were used but not defined:
 MAXIMA::$ZETA MAXIMA::FACTORIAL MAXIMA::FLOAT-NUMERICAL-EVAL-P
 MAXIMA::COMPLEX-FLOAT-NUMERICAL-EVAL-P MAXIMA::LAMBERT-W
 MAXIMA::COMPLEX-BIGFLOAT-NUMERICAL-EVAL-P MAXIMA::BFLOAT-LAMBERT-W
0 errors, 1 warning
make[1]: *** [binary-clisp/maxima.mem] Error 1

I'm using clisp 2.47.

David


_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima