[Cython] C99/C++ complex type support

Robert Kern robert.kern at gmail.com
Mon Dec 29 22:07:46 CET 2008


Robert Bradshaw wrote:
> On Dec 29, 2008, at 12:45 PM, Lisandro Dalcin wrote:
> 
>> On Mon, Dec 29, 2008 at 5:42 PM, Robert Kern  
>> <robert.kern at gmail.com> wrote:
>>> You might want to follow numpy's lead and define complex64 (float  
>>> complex),
>>> complex128 (double complex), etc.
>>>
>> I really like your idea... Let's see what other people think about  
>> this...
> 
> Yes. Note that "double complex" typically means a complex with double- 
> prec real and imaginary parts, not 128 bits.

Right. numpy goes with the convention that the bit-width suffix is the width of 
the entire item, not the component real and imaginary parts for the complex type.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco



More information about the Cython-dev mailing list