Hi,
I'm performing simple division of float variable datatype, but getting different result each time while debugging. Using C2000 Compiler Version: TI v21.6.0.LTS
Below is my simple code snippet:
float32_t reqPeriod = 0.00, Freq1= 0.00;
main()
{
reqPeriod = 1.00 / Freq1;
}
Issue:
Case 1: Input: Freq1 = 80010.0
reqPeriod = 0.997898 (Expected reqPeriod = 1.249844e^-5)
and goes to void __error__(const char *filename, uint32_t line);
Now, again entering different input
Case 2: Next input: Freq1 = 80000.0
reqPeriod: 1.25e^-5
Now, again entering same previous input
Case 3: Freq1 = 80010.0
reqPeriod: 1.249844e^-5x
Again while checking the same input, getting wrong result everytime.
Executing the above code on TMS320F28379D launchpad.
Getting random error while calculating the division, Can you pls help!