AnsweredAssumed Answered

Math library for Optimized for FPU

Question asked by petermckinnis on Oct 19, 2012
Latest reply on Oct 24, 2012 by Jim Donelson

I am working on a project using a Kinetis K60F processor with a FPU.  I noticed that the standard math library (math.h) seems to be implemented in software.  For example, the following code (see below) to take the sin of 0.0 is implemented in double precision (per the C standard).  Is there a compiler option somewhere that uses hardware accelerated math routines, (or alternatively a third party library)?  If so, how can I use this library.


#include <math.h>

void aFunction() {
float ans = sin(0.0f);  //Gives compiler warning: implicit arithmetic conversion from 'double' to 'float'
}

Outcomes