#20438: Wrapper_cdf.call_c() drops imaginary part
-------------------------------------------------+-------------------------
       Reporter:  cswiercz                       |        Owner:
           Type:  defect                         |       Status:  new
       Priority:  major                          |    Milestone:  sage-7.2
      Component:  cython                         |   Resolution:
       Keywords:  fast_callable, interpreters,   |    Merged in:
  wrapper_cdf                                    |    Reviewers:
        Authors:  cswiercz                       |  Work issues:
Report Upstream:  N/A                            |       Commit:
         Branch:                                 |     Stopgaps:
   Dependencies:                                 |
-------------------------------------------------+-------------------------

Comment (by jdemeyer):

 A workaround:
 {{{
 cdef inline complex call_c(Wrapper_cdf f, complex x, complex y):
     # Quickly evaluates a fast_callable function `f` on domain `CDF`
     # (a Wrapper_cdf tupe) with complex arguments `x`, and `y`.

     cdef double complex[2] input
     cdef double complex[1] output
     input[0] = x
     input[1] = y
     f.call_c(<double_complex*>input, <double_complex*>output)
     return output[0]
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/20438#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

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

Reply via email to