[Developers] Complex numbers in C++

Erik Schnetter schnetter at cct.lsu.edu
Thu Jul 6 21:04:47 CDT 2006


In order to make handling complex numbers in C++ easier to handle, I  
suggest to define overloaded operators for the standard operations.   
These would be static inline functions calling the underlying Cactus  
functions.  They would provide the same (or a bit smaller) interface  
as the C++ STL complex class.

A further  step could then be to autoconfigure whether the C++ STL  
complex class exists, and if it does, to use it instead of declaring  
the Cactus complex data types and static inline wrappers.

Another step could then be to provide static inline extern "C"  
wrappers in C++ instead of the Cactus-provided functions.  This would  
improve performance and accuracy.  Alternatively, we could detect for  
the C99 complex datatype.

-erik

-- 
Erik Schnetter <schnetter at cct.lsu.edu>

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/developers/attachments/20060706/21282ee2/attachment.bin 


More information about the Developers mailing list