On 20 November 2014 01:54, Ondřej Čertík <ondrej.cer...@gmail.com> wrote:
>
> What you posted looks good. But we need to test it for arg(z), re(z),
> im(z) and any other non-analytic function that we can find.
>

(1) -> re(x)==(conjugate(x)+x)/2
                                                                   Type:
Void
(2) -> im(x)==%i*(conjugate(x)-x)/2
                                                                   Type:
Void
(3) -> arg(x)==log(x/abs(x))/%i
                                                                   Type:
Void
(4) -> re %i
   Compiling function re with type Complex(Integer) -> Fraction(Complex
      (Integer))

   (4)  0
                                             Type:
Fraction(Complex(Integer))
(5) -> im %i
   Compiling function im with type Complex(Integer) -> Fraction(Complex
      (Integer))

   (5)  1
                                             Type:
Fraction(Complex(Integer))
(6) -> arg %i
   Compiling function arg with type Complex(Integer) -> Expression(
      Complex(Integer))

   (6)  - %i log(%i)
                                           Type:
Expression(Complex(Integer))
(7) -> complexNumeric %

   (7)  1.5707963267_948966192
                                                         Type:
Complex(Float)
(8) -> D(re(x),x)
   Compiling function re with type Variable(x) -> Expression(Integer)

   (8)  1
                                                    Type:
Expression(Integer)
(9) -> D(im(x),x)
   Compiling function im with type Variable(x) -> Expression(Complex(
      Integer))

   (9)  0
                                           Type:
Expression(Complex(Integer))
(10) -> D(arg(x),x)
   Compiling function arg with type Variable(x) -> Expression(Complex(
      Integer))

             _             2       2
         %i xx - 2%i abs(x)  + %i x
   (10)  ---------------------------
                           2
                  2x abs(x)
                                           Type:
Expression(Complex(Integer))


I had a thought. I suppose that all non-analytic (nonholomorphic) functions
of interest can be written in terms of conjugate and some analytic
functions, e.g.

  abs(x)=sqrt(x*conjugate(x))

so perhaps all we really need is to know how to differentiate conjugate
properly?

Bill

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to