From: John K. <jk2...@ya...> - 2003-11-09 02:32:31
|
Hello, In the 0.8.5 release, the following won't compile, though it compiles fine under CMUCL. Regards, John (defun find-lc-for-e (phi-func r-max energy) (declare (type double-float r-max energy) (type (function (double-float) double-float) phi-func)) (loop with best-l2 of-type double-float = 0d0 ;; need to add phi0 to phi because we define phi (and E) to ;; have a minimum value of 0 with phi0 = (funcall phi-func 0d0) for r of-type double-float from 0d0 to r-max by (/ r-max 1d5) for l2 of-type double-float = (* 2d0 r r (- energy (+ phi0 (funcall phi-func r)))) do (setf best-l2 (max l2 best-l2)) finally (return (sqrt best-l2)))) The error is: ;;;;;;;;;;;;;;; ; (LOOP WITH BEST-L2 = 0.0d0 WITH PHI0 = (FUNCALL PHI-FUNC 0.0d0) FOR ...) ; ; caught error: ; (in macroexpansion of (loop with best-l2 ...)) ; (hint: For more precise location, try *BREAK-ON-SIGNALS*.) ; 0 can't be converted to type (and double-float (real (0))). ;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;; PS: in my last mail I think that some 'with' loop clauses should have been 'for' clauses, but this doesn't change the fact that the compiler got a 'shouldn't happen' type bug __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree |