[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More bum code



It seems a shame to change the names in the code without improving the
algorithm.  So I bummed out a quarter of the multiplications and a
seventh of the additions, and dyked out the useless clause.  Sorry it's
so late....

(defun f(| |)
  (labels ((|| (| |)
	       (cond ((zerop | |) (values 1 0))
		     ((evenp | |)
		      (multiple-value-bind (|(| |)|) (|| (/ | | 2))
			(values (+ (* |(| |(|) (* |)| |)|))
				(* (+ |(| (- |(| |)|)) |)|))))
		     (t
		      (multiple-value-bind (|(| |)|) (|| (/ (1- | |) 2))
			(values (* |(| (+ |(| |)| |)|))
				(+ (* |(| |(|) (* |)| |)|))))))))
    (values (|| | |))))

Dan