Debian Codegraph @

cmake/cxx_tests/have_complex_math2.cpp

raw
1 // DESCRIPTION
2 //
3 // Test to check whether the C++ compiler has the complex math functions
4 // acos, asin, atan, atan2 and log10.
5 // In sync with AC_CXX_HAVE_COMPLEX_MATH2 (2008-04-12).
6 //
7 // COPYLEFT
8 //
9 // Copyright (c) 2009 Theo Papadopoulo <[email protected]>
10 // Copyright (c) 2008 Todd Veldhuizen
11 // Copyright (c) 2008 Luc Maisonobe <[email protected]>
12 //
13 // Copying and distribution of this file, with or without modification, are
14 // permitted in any medium without royalty provided the copyright notice
15 // and this notice are preserved.
16
17 #include <complex>
18 using namespace std;
19
20 int main() {
21 complex<double> x(1.0,1.0),y(1.0,1.0);
22 acos(x);
23 asin(x);
24 atan(x);
25 atan2(x,y);
26 atan2(x,double(3.0));
27 atan2(double(3.0),x);
28 log10(x);
29 return 0;
30 }