// filename:c2011-7-3-9-5-ex.c // original examples and/or notes: // (c) ISO/IEC JTC1 SC22 WG14 N1570, April 12, 2011 // C2011 7.3.9.5 The creal functions // compile and output mechanism: // (c) Ogawa Kiyoshi, kaizen@gifu-u.ac.jp, December.29, 2013 // compile errors and/or wornings: // (c) Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn) // Target: x86_64-apple-darwin11.4.2 //Thread model: posix // (c) LLVM 2003-2009 University of Illinois at Urbana-Champaign. #include #include // note 171) int main(void) { double complex z = 5+ 3* I; if (z == creal(z) + cimag(z)*I) printf("%f %+fi\n",creal(z),cimag(z)); return printf("7.3.9.5 The creal functions\n"); } // output may be // 5.000000 +3.000000i // 7.3.9.5 The creal functions