Re: [Maxima] Numerical function evaluation with complex numbers



>>>>> "go" == go furuya <go_furuya@infoseek.jp> writes:

    go> hi toy
    >> 
    >> 
    >> Try this:
    >> 
    >> (C3) sin(1+%i);
    >> 
    >> (D3) 				  SIN(%I + 1)
    >> (C4) ev(%,numer);
    >> 
    >> (D4) 				  SIN(%I + 1)
    >> 

    go> (C3) trigexpand(sin(1+%i);

    go> (D3) %I COS(1) SINH(1) +COSH(1) SIN(1)

    go> (C4)%,numer ;

This obviously works, but I find it a bit annoying that maxima doesn't
do this automatically when I ask it for a numerical value.

I think I know how to do this (at least it's working with my elliptic
function code[1]), but if no one thinks this is the right answer, then
perhaps I'm wrong about it.

Ray

Footnotes: 
[1]  This points out a small bug.  maxima defines its own versions of
asin, acos, atan, sinh, cosh, tanh, asinh, acosh, and atanh, which are
all standard Lisp functions.  This prevented me from computing
elliptic functions for complex args.  These should probably be
modified.  Plus I think the definitions for sinh, tanh, and perhaps
others lose precision for x near 0.