This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

math.h documentation



Where to find the C28x fpu math.h documentation? For example, what is the description about function

float fmaf(float x, float y, float z);

Is there a function similar to fsat(float x, float max, float min)?

  • Hi Louis,

    You are asking about the standard C math library that is embedded in the runtime support library rts2800_fpu32.lib. I dont think we provide documentation for anything in the standard C library since its available online.

    But the functions you are inquiring about seem to be supported from C99 onwards (en.cppreference.com/.../fma). I don't know if these are currently supported so i am pushing this post over to the compiler forum.
  • The RTS function fma is specified in the C99 standard for ANSI C.  An internet search on the term ansi c99 standard will give you links to standards documents.  You can search for a description of any standard library function.  You'll see that fma is the name for the double type variant of the function.  The function fmaf does the same thing, but for the float type.  There is no function named fsat.

    Thanks and regards,

    -George

  • Louis, FYI there is an __fsat intrinsic, please see the compiler guide SPRU514, Table 7-7. It takes arguments double and returns a double but on the c28x double is the same as float, i.e. single precision floating point (see Table 6-1 of the same doc).
  • Thank you! I could've researched myself, but your support saved my time and provided confirmation, that's what customers needed.