My opinion is that specifying exact bit lengths should be an orthogonal issue/feature to complex float types. Cython already uses the C type system, and making an exception for complex types seems inconsistent and harder to learn. So I vote for using the syntax "complex long double" and so on, and what the "long double" part means is up to the C compiler (like other types work).
Note that no matter what we do, "complex64" etc. should be made available as typedefs in numpy.pxd, making use of the bit-length-detection already in the numpy C headers. Dag Sverre Seljebotn -----Original Message----- From: Robert Kern <[email protected]> Date: Monday, Dec 29, 2008 10:07 pm Subject: Re: [Cython] C99/C++ complex type support To: [email protected]: [email protected] 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 >> <[email protected]> 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 > >_______________________________________________ >Cython-dev mailing list >[email protected] >http://codespeak.net/mailman/listinfo/cython-dev > _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
