On Thu, May 14, 2009 at 4:48 PM, Lisandro Dalcin <[email protected]> wrote: > However, interestingly enough, my C++ <complex> header (from GCC > 4.3.2) seems to implements the naive way (although warned in the > comment)... Am I missing something here??
GSL (the GNU Scientific Library) also uses the naive algorithm. Perhaps everybody else has decided that speed is more important than accuracy, or perhaps they haven't thought of the issues at all? How much difference in accuracy are we talking about? (BTW, the Sage arbitrary-precision complex and complex interval arithmetic also use the naive algorithm; if it is significantly bad, then Sage should be fixed too.) On the other hand, I think that gcc's "complex double" does not use the naive algorithm. (I haven't traced through the assembly language to see exactly what it does, but it does have conditional branches, if I'm reading the x86 assembly correctly.) Carl _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
