>>>>> "Raymond" == Raymond Toy writes:
Raymond> 1. (*) text/plain ( ) text/html
>>>>> "David" == CALCRTS writes:
David> 1. (*) text/plain ( ) text/html
David> I have checked in this patch. It is similar, but always does
Raymond> the
David> numerical
David> evaluation if a complex numeric arg contains a float.
David> Also added some tests to the end of rtest14.mac
David> --- src/csimp2.lisp 25 Nov 2004 02:36:00 -0000 1.8
David> +++ src/csimp2.lisp 20 May 2005 10:31:13 -0000 1.9
David> @@ -178,8 +178,14 @@
David> (defmfun simpgamma (x vestigial z)
David> vestigial ;Ignored.
David> (oneargcheck x)
David> - (let ((j (simpcheck (cadr x) z)))
David> + (let* ((j (simpcheck (cadr x) z))
David> + (jr ($realpart j))
David> + (ji ($imagpart j)))
David> (cond ((floatp j) (gammafloat j))
David> + ((and (numberp jr)
David> + (numberp ji)
David> + (or $numer (floatp jr) (floatp ji)))
David> + (complexify (gamma-lanczos (complex jr ji))))
David> ((or (not (mnump j))
David> (ratgreaterp (simpabs (list '(%abs) j) 1 t)
Raymond> $gammalim))
David> (eqtest (list '(%gamma) j) x))
Raymond> If I read this correctly, gamma(1+1/2*%i),numer won't evaluate
Raymond> numerically, because (numberp ji) is false. My patch does. But with
I am mistaken. gamma(1+1/2*%i),numer works because by the time this
routine is called, 1+1/2*%i has been converted to numeric form.
There is one minor mistake, and I've already checked in a fix for
that.
Ray