evaluating erf(%i) in maxima



>>>>> "Stavros" == Stavros Macrakis  writes:


    Ray> If I read this correctly, gamma(1+1/2*%i),numer won't evaluate
    Ray> numerically, because (numberp ji) is false.  My patch does.  But with 
    Ray> my patch, gamma(1+0.5*%i) does not give a number unless you specify
    Ray> numer.  So both are deficient in some way.



    Stavros> Standard Maxima semantics are that operations on exact numbers are exact
    Stavros> except with numer=true, so gamma(1+1/2*%i) should not return a float.
    Stavros> Floats and bfloats are inexact.

Yes, but I said "gamma(1+1/2*%i),numer".  Shouldn't that give a
numerical value?  If yes, the code says

    David> +         ((and (numberp jr) 
    David> +               (numberp ji)
    David> +               (or $numer (floatp jr) (floatp ji)))
    David> +            (complexify (gamma-lanczos (complex jr ji))))

In this case ji = 1/2 (or ((mrat) 1 2)), so (numberp ji) is probably
false, so it never gets a chance to call gamma-lanczos.

But I haven't applied and tested this patch yet.

Ray