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.

C66XCODECS: Issue in ti standard library function abs()

Part Number: C66XCODECS

Hi Sir,

We are doing Unit Test in VectorCast where we are building the source code using below compiler

ccsv8

Compiler: c6000_7.4.2

Also using simulator tisim_c64xple.ccxml for running the test cases

We have below code snippet in our source code.

If we pass -2147483648 (int32 min value) for f_inArg0, then abs function is returning as 2147483647 instead of 2147483648

Please check and let us know the solution.

fix16Q16_t Fix16Q16::divideVal(fix16Q16_t f_inArg0, fix16Q16_t f_inArg1, uint32 f_divider, uint32 f_bit) const
{
uint32 l_remainder = static_cast<uint32>(abs(f_inArg0));
}