Talk:cpp/numeric/complex/asin

Implementation
It may have sense to add the code of the routine, that evaluates asin. Some compilers do not support some functions. I supply below the example with asin

t~/Q/TORI/ARCSIN>more 03.cc using namespace std; //using namespace std::complex; typedef complex z_type; main{ z_type z= z_type(.5,.5); z_type c=asin(z); printf("%9.8f %9.8f\n",Re(c),Im(c)); }
 * 1) include 
 * 2) include 
 * 3) include 
 * 1) include
 * 1) define Re(x) x.real
 * 2) define Im(x) x.imag

t~/Q/TORI/ARCSIN>make 03 g++    03.cc   -o 03 03.cc: In function ‘int main’: 03.cc:12: error: no matching function for call to ‘asin(z_type&)’ /usr/include/architecture/i386/math.h:256: note: candidates are: double asin(double) /usr/include/c++/4.2.1/cmath:123: note:                long double std::asin(long double) /usr/include/c++/4.2.1/cmath:119: note:                float std::asin(float) make: *** [03] Error 1

I search for any library that would support the complex double std::asin(complex double), but it seems to me to be easier to write the routine for asin by myself than to find it in the internet..

I think, that addition of the code of the routine could improve the article. Sincerely, DmitriiKouznetsov (talk) 07:02, 3 December 2013 (PST)


 * complex asin is a part of the C++11 language specification. Upgrade your GCC (4.2.1 is 7 years old) and use the commandline argument . You can see your program work online: http://coliru.stacked-crooked.com/a/f5e2d99d023df198 --Cubbi (talk) 09:29, 3 December 2013 (PST)