13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LibrariesReturns a pointer to type struct lconv with values appropriate <strong>for</strong> the <strong>for</strong>matting of numericquantities according to the rules of the current locale. The struct lconv in this header file iscon<strong>for</strong>ming the ISO standard.13.2.15. malloc.hThe header file malloc.h contains prototypes <strong>for</strong> memory allocation functions. This include file is notdefined in ISO C99, it is included <strong>for</strong> backwards compatibility with ISO C90. For ISO C99, the memoryallocation functions are part of stdlib.h. See Section 13.2.24, stdlib.h and wchar.h.malloc(size)calloc(nobj,size)free(*ptr)realloc(*ptr,size)Allocates space <strong>for</strong> an object with size size.The allocated space is not initialized. Returns a pointer to theallocated space.Allocates space <strong>for</strong> n objects with size size.The allocated space is initialized with zeros. Returns a pointer tothe allocated space.Deallocates the memory space pointed to by ptr which should bea pointer earlier returned by the malloc or calloc function.Deallocates the old object pointed to by ptr and returns a pointerto a new object with size size, while preserving its contents.If the new size is smaller than the old size, some contents at theend of the old region will be discarded. If the new size is larger thanthe old size, all of the old contents are preserved and any bytes inthe new object beyond the size of the old object will haveindeterminate values.13.2.16. math.h and tgmath.hThe header file math.h contains the prototypes <strong>for</strong> many mathematical functions. Be<strong>for</strong>e ISO C99, allfunctions were computed using the double type (the float was automatically converted to double, prior tocalculation). In this ISO C99 version, parallel sets of functions are defined <strong>for</strong> double, float and longdouble. They are respectively named function, functionf, functionl. All long type functions, thoughdeclared in math.h, are implemented as the double type variant which nearly always meets therequirement in embedded applications.The header file tgmath.h contains parallel type generic math macros whose expansion depends on theused type. tgmath.h includes math.h and the effect of expansion is that the correct math.h functionsare called. The type generic macro, if available, is listed in the second column of the tables below.Trigonometric and hyperbolic functionsmath.htgmath.hDescriptionsinsinfsinlsinReturns the sine of x.coscosfcoslcosReturns the cosine of x.tantanftanltanReturns the tangent of x.asinasinfasinlasinReturns the arc sine sin -1 (x) of x.749

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

Saved successfully!

Ooh no, something went wrong!