11.07.2015 Views

Imagecraft c compiler and development environment for the atmel avr

Imagecraft c compiler and development environment for the atmel avr

Imagecraft c compiler and development environment for the atmel avr

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.

ICCV8 <strong>for</strong> AVR – C Compiler <strong>for</strong> Atmel AVRreturns a fraction f <strong>and</strong> stores a base-2 integer into *pexp that represents <strong>the</strong> valueof <strong>the</strong> input x. The return value is in <strong>the</strong> interval of [1/2, 1) <strong>and</strong> x equals f *2**(*pexp). float froundf(float x)rounds x to <strong>the</strong> nearest integer. float ldexpf(float x, int exp)returns x * 2**exp. float logf(float x)returns <strong>the</strong> natural logarithm of x. float log10f(float x)returns <strong>the</strong> base-10 logarithm of x. float modff(float x, float *pint)returns a fraction f <strong>and</strong> stores an integer into *pint that represents x. f + (*pint)equal x. abs(f) is in <strong>the</strong> interval [0, 1) <strong>and</strong> both f <strong>and</strong> *pint have <strong>the</strong> same signas x. float powf(float x, float y) )returns x raised to <strong>the</strong> power y. float sqrtf(float x) )returns <strong>the</strong> square root of x. float sinf(float x)returns <strong>the</strong> sine of x <strong>for</strong> x in radians. float sinhf(float x)returns <strong>the</strong> hyperbolic sine of x <strong>for</strong> x in radians. float tanf(float x) )returns <strong>the</strong> tangent of x <strong>for</strong> x in radians. float tanhf(float x)returns <strong>the</strong> hyperbolic tangent of x <strong>for</strong> x in radians.Since, by default, float <strong>and</strong> double have <strong>the</strong> same size (32 bits), math.h alsocontains a set of macros that map <strong>the</strong> function names to be without <strong>the</strong> f suffix <strong>for</strong>m.For example, pow is <strong>the</strong> same as powf, sin is <strong>the</strong> same as sinf, etc.94

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

Saved successfully!

Ooh no, something went wrong!