29.10.2014 Views

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Compiler</strong> Coding Practices<br />

5.76 Complex numbers in C99<br />

In C99 mode, <strong>the</strong> compiler supports complex and imaginary numbers.<br />

For example:<br />

#include <br />

#include <br />

int main(void)<br />

{<br />

complex float z = 64.0 + 64.0*I;<br />

printf("z = %f + %fI\n", creal(z), cimag(z));<br />

return 0;<br />

}<br />

The complex types are:<br />

• float complex<br />

• double complex<br />

• long double complex.<br />

5.76.1 See also<br />

Concepts<br />

• New library features of C99 on page 5-79.<br />

<strong>ARM</strong> DUI 0375C Copyright © 2007-2008, 2011 <strong>ARM</strong>. All rights reserved. 5-94<br />

ID061811<br />

Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!