Hello
I'm periodically seeing some erroneous floating point arithmetic results when having interrupts enabled.
To be clear, these calculations are being done in a function periodically called from the main loop. Most of the time the results are correct, but periodically I'm seeing the result going to zero when using the same multiplicand/multiplier/etc.
My routine does several floating point multiplications, divisions, etc.
I noticed that when I disable interrupts, the results are correct and consistent.
An example of code snippet is as follows:
static real32 A;
static real32 B;
A = 100.0 * 1500.0;
B = ((A / 20000.0F) * 100);
The value of B goes to 0.0 randomly sometimes.
Could you please provide some insight on this?