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'

}

You can down load the source from here:

http://www.onarm.com/cmsis/download/21/version-3-0-of-the-cortex-microcontroller-software-interface-standard-cmsis/