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.

copysignf and signbit

Expert 1215 points
Other Parts Discussed in Thread: CCSTUDIO

Hi, 

Are copysignf and signbit functions implemented for C67? They are parts of newer C standards - C99, at least.

Thanks

  • They are included with codegen 6.1.x.

    Brad

  • I have math.h and mathf.h v6.1.5, they don't have these two functions.

  • I just looked in my computer and I have these functions for CGT 6.1.5, but the include that contains it is in a different place:

    C:\CCStudio_v3.3\C6000\cgtools\lib\rtssrc\DINKUMLIB\include\c\math.h

    OR (depending on where you installed CGT)

    C:\Program Files\C6000 Code Generation Tools 6.1.5\lib\rtssrc\DINKUMLIB\include\c\math.h

    To get there, you need to go to: C:\Program Files\C6000 Code Generation Tools 6.1.5\lib (or C:\CCStudio_v3.3\C6000\cgtools\lib ) and unzip the file rtssrc.zip to get the RTS source.

    I'm not sure why these functions are not in the include at C:\Program Files\C6000 Code Generation Tools 6.1.5\include (or C:\CCStudio_v3.3\C6000\cgtools\include ), I will ask the CGT team about that.

  • I asked our code generation team and got this response:

    code generation team said:

    We do not support copysign.  It does appear in certain header files, but under #if conditions that are false.  This function is defined in the C99 standard, which we do not support.

    So although my earlier statement about it being included in 6.1.x is sort of correct, it is a bit misleading.  There is actually a copysign.c file in there, though apparently it does not get built into the libraries.  Sorry to mislead you!

    Brad