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.

TMS320F28035: TMS320F28035: what is the name of the arctan function in software library, ? what is the input range of the arctan function ? if the arctan function output is per-unit ? if there are some example of how to use the arctan function ? many

Part Number: TMS320F28035


TMS320F28035:  what is the name of  the arctan function in software library,  ? what is the input range of the  arctan function ? if the  arctan function output is per-unit ? if there are some example of how to use the arctan function ? many thanks !

  • Andrew,

    I presume you are asking about the C run-time support library. Let me know if that is not the case.

    Arctangent is supported by the standard C functions:
    atan() for double
    atanf() for float
    atnl() for long double

    You will need to include the header file math.h to have access to these. In all cases the input range is +/- infinity, the output is in radians. For example, try:

    float val = -10.25f;
    volatile float y = 0.0f;

    main()
    {

    do {
    val += 0.25f;
    y = atanf(val);
    } while (val <= 10.0f);

    y should change between about -pi and +pi.

    Regards,

    Richard