evaluating erf(%i) in maxima
- Subject: evaluating erf(%i) in maxima
- From: Raymond Toy
- Date: Tue, 17 May 2005 17:14:58 -0400
>>>>> "Vadim" == Vadim V Zhytnikov writes:
Vadim> It would be great to have complex gamma in 5.9.2 - gamma-lanczos
Vadim> is in the csimp2.lisp.
Here's a simple patch to call gamma-lanczos for a complex arg.
Ray
Index: csimp2.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima/src/csimp2.lisp,v
retrieving revision 1.8
diff -u -r1.8 csimp2.lisp
--- csimp2.lisp 25 Nov 2004 02:36:00 -0000 1.8
+++ csimp2.lisp 17 May 2005 21:14:22 -0000
@@ -180,6 +180,10 @@
(oneargcheck x)
(let ((j (simpcheck (cadr x) z)))
(cond ((floatp j) (gammafloat j))
+ ((and $numer (complex-number-p j))
+ (let ((result (gamma-lanczos (complex (float ($realpart j))
+ (float ($imagpart j))))))
+ (complexify result)))
((or (not (mnump j))
(ratgreaterp (simpabs (list '(%abs) j) 1 t) $gammalim))
(eqtest (list '(%gamma) j) x))