Mark Butcher

Coldfire / CW6.3/7.0 modf()

Discussion created by Mark Butcher on May 11, 2008
Latest reply on May 12, 2008 by Nouchi
Hi All

We are trying to use modf() but not having any success with CW.

Test code:
      #include <math.h>
      double  intpart, fractpart, param;

      param = 3.14159265;
      fractpart = modf (param , &intpart);

This results in an error due to math.h not including a prototype for modf().
As reference, the same code works with GNU.

In the MSL C reference manual the function modf() is described with a not that it may not be implemented for all platforms. The Metrowerks link for more infomration goes to the general Freescale web site where there didn't seem to be any more data.

Does any one have any more information on this?