You are here:

C++/Complex number data type in programming languages.

Advertisement


Question
Dear Vijayan

http://en.wikipedia.org/wiki/Complex_number‎
http://www.mathsisfun.com/numbers/complex-numbers.html‎
http://www.purplemath.com/modules/complex.htm‎
http://www.mathwarehouse.com/algebra/complex-number/‎
http://en.wikipedia.org/wiki/Programming_language
http://en.wikipedia.org/wiki/List_of_programming_languages
http://en.wikipedia.org/wiki/Computer_graphics
http://c2.com/cgi/wiki?ComplexNumbers‎
http://betterexplained.com/articles/a-visual-intuitive-guide-to-imaginary-number

Do you feel whether the complex number data type can be useful in programming languages viz C, C++, Java, C# etc similar to integer,float,double,char,string,bool,date,user defined data types viz class, struct etc ?.

The use of Complex Number Data Type would be useful in designing and developing graphical applications using the above programming languages ?.

Awaiting your reply,

Thanks & Regards,
Prashant S Akerkar

Answer
> Do you feel whether the complex number data type can be useful in programming languages viz C, C++, Java, C# etc similar to integer,float,double,char,string,bool,date,user defined data types viz class, struct etc ?.

Complex numbers are typically used in C or C++ programs; primarily because high performance number crunching requires a native code compiler.

C++ already has a std::complex<> http://en.cppreference.com/w/cpp/numeric/complex

And C added support for complex numbers in C99
http://www.qnx.com/developers/docs/6.5.0/topic/com.qnx.doc.dinkum_en_c99/complex

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


vijayan

Expertise

my primary areas of interest are generic and template metaprogramming, STL, algorithms, design patterns and c++11. i would not answer questions about gui and web programming.

Experience

about 15 years or so

Education/Credentials
post graduate engineer

©2016 About.com. All rights reserved.