>>>>> "Paolo" == Paolo Nason <Paolo.Nason@mib.infn.it> writes:
Paolo> I usually fixed this by loading the following:
Paolo> (in-package "MAXIMA")
Paolo> ;; the following, taken unaltered from csimp2.lisp, for some
Paolo> ;; unknown reason fixes bug in gamma(negative float).
Paolo> (defun do-gammafloat (a)
Paolo> (do ((r 1.0 (*$ z r))
Paolo> (s (minusp a)) (z (abs a)))
Paolo> ((not (greaterp z 1.0))
Paolo> (setq r (*$ r (gamma z)))
Paolo> (cond (s (t//$ -3.141592654 (*$ a r ($sin (*$ 3.141592654 a))) 'gamma))
Paolo> (t r)))
Paolo> (setq z (1-$ z))))
Found the problem. When csimp2 is compiled, t//$ is defined yet (it's
in trigi). Change that line from
(cond (s (t//$ -3.141592654 (*$ a r ($sin (*$ 3.141592654 a))) 'gamma))
to
(cond (s (//$ -3.141592654 (*$ a r ($sin (*$ 3.141592654 a)))))
and gamma(-0.2) returns the expected value.
Ray