Considering the atmega328p:
Obviously it won't work, and the value which comes out will be nonsense, but...
...will it cause any "damaging" crash circumstances? The way that errors from over-writing the end of an array can?
Can divide by zero errors ever cause other variables to get corrupted? Can they cause programs to jump location strangely?
If a piece of code such as
float Output=FirstFloat/SecondFloat;
where SecondFloat is a variable taken from sensor readings (compiler never knows its value in advance) nd goes to zero.
What about
float Output=FirstFloat/SecondUint8;
where SecondUint8 is a uint8_t, and goes to zero, again sensor derived so no compiler detection.
I ran tests of these and got nan values printed over serial, so can verify they give the junk values expected, but I can't think how to test whether corruption of other variables is possible.
Also what if a NaN gets fed in to a function like sin or atan2? Again just a corrupt output value, or stack troubles and other variables messed with?
I know that if one tries to average, or add, or low pass filter a NaN value then it corrupts all future uses of that value.
LPF=(1-alpha)ValueIn+alphaLPF ;
has LPF permanently sent to NaN if ValueIn is ever NaN, but where one is sensing an instantaneous value, and can cope with it being a junk value at times when a variable does go to zero, and then fully replaces the value of the variable from fresh readings at later times, is there any harm in letting divide by zero occur?
Thanks