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.75 Additional library functions in C99<br />

C99 supports additional macros, types, and functions in <strong>the</strong> standard header that are<br />

not found in <strong>the</strong> corresponding C90 standard header.<br />

New macros found in C99 that are not found in C90 include:<br />

INFINITY // positive infinity<br />

NAN // IEEE not-a-number<br />

New generic function macros found in C99 that are not found in C90 include:<br />

#define isinf(x) // non-zero only if x is positive or negative infinity<br />

#define isnan(x) // non-zero only if x is NaN<br />

#define isless(x, y) // 1 only if x < y and x and y are not NaN, and 0 o<strong>the</strong>rwise<br />

#define isunordered(x, y) // 1 only if ei<strong>the</strong>r x or y is NaN, and 0 o<strong>the</strong>rwise<br />

New ma<strong>the</strong>matical functions found in C99 that are not found in C90 include:<br />

double acosh(double x); // hyperbolic arccosine of x<br />

double asinh(double x); // hyperbolic arcsine of x<br />

double atanh(double x); // hyperbolic arctangent of x<br />

double erf(double x); // returns <strong>the</strong> error function of x<br />

double round(double x); // returns x rounded to <strong>the</strong> nearest integer<br />

double tgamma(double x); // returns <strong>the</strong> gamma function of x<br />

C99 supports <strong>the</strong> new ma<strong>the</strong>matical functions <strong>for</strong> all real floating-point types.<br />

Single precision versions of all existing functions are also supported.<br />

5.75.1 See also<br />

Concepts<br />

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

O<strong>the</strong>r in<strong>for</strong>mation<br />

• Institute of Electrical and Electronics Engineers, http://www.ieee.org<br />

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

ID061811<br />

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!